4 ms·
> There's no portion of the code that does warmups. This isn't true - Benchmark.js will repeatedly rerun benchmarks until it gathers statistically meaningful r
by phpnode 6y ago
> There's no portion of the code that does warmups.
This isn't true - Benchmark.js will repeatedly rerun benchmarks until it gathers statistically meaningful results.
> There's no portion of code that "blackholes" the results to keep the JIT from optimizing away the code under benchmark.
True, and there's actually nothing benchmark.js can do to ensure that doesn't happen in the general case but when this does happen the results are usually pretty obvious - we'd see billions of ops/sec. Incidentally the left-pad benchmarks do not suffer from this issue.