It looks like it is the jit compilation which messes with the execution of that loop. Disable jit compilation and it is as fast as you’d expect:
if jit then jit.off() end
run_loop()
if jit then jit.on() end
It looks like it is the jit compilation which messes with the execution of that loop. Disable jit compilation and it is as fast as you’d expect:
if jit then jit.off() end
run_loop()
if jit then jit.on() end