Full threadkevingadd·It's called Loop Invariant Code Motion, and it's why jsperf benchmarks are mostly inaccurate. A smart JIT can hoist all the 'work' in a benchmark out of the benchmark loop and only run it once.View on HN