Reduce frequency in which checks for timeouts are done in yr_execute.
Frequency has been reduced to a check every 10 instructions to a check every 100 instructions. This improves performance at the expense of timeout accuracy.
@@ -1631,10 +1631,10 @@ int yr_execute_code(
assert(false);
}
- // Check for timeout every 10 instruction cycles. If timeout == 0 it means
+ // Check for timeout every 100 instruction cycles. If timeout == 0 it means
// no timeout at all.
- if (context->timeout > 0L && ++cycle == 10)
+ if (context->timeout > 0L && ++cycle == 100)
{
elapsed_time = yr_stopwatch_elapsed_us(&context->stopwatch);
