3 ms·
If you mean to run this benchmark across different browsers, you should know there might be some problems with the time measurement technique you’re using. Read
by mathias 16y ago
If you mean to run this benchmark across different browsers, you should know there might be some problems with the time measurement technique you’re using. Read http://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/ http://calendar.perfplanet.com/2010/bulletproof-javascript-b... for a detailed explanation.
Why not use Benchmark.js https://github.com/mathiasbynens/benchmark.js https://github.com/mathiasbynens/benchmark.js for your test case? This library will take care of all the issues mentioned in the article I linked to. Or just take the easy road and use http://jsperf.com/ http://jsperf.com/ which uses Benchmark.js behind the scenes :)
- shazow 16y agoTrue story. Wasn't aware of Benchmark.js, looks good! Anyone want to fork n' port? :)