mathiasbynens/jsperf.com

JSPerf reports 3x the ops/sec in comparison to Benchmark JS?

Closed this issue · 1 comments

Hello,
I have written a JSPerf test (link = http://jsperf.com/glmatrix-vs-redux-mat2) and for example: The second test on there called "Redux Create Method" in particular reports as high as 97 million ops per second where as using the exact same code and the exact same test, Benchmark JS reports about 31 million. JSPerf is running in a web browser and Benchmark JS is running through Node, but if anything, I would expect Node to be much faster. Any thoughts?

The hallmark of a micro benchmark :D
jsperf and the npm package of benchmark.js aren't in sync (jsperf.com uses a more edge version) but even then micro benchmarks are not the best way to measure performance. It's better to take a real world scenario and extract a test that way after profiling to find a perf pain point.