jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
I know eval is evil but how does it perform next to reduce in this particular instance?
var sm = [10, 23, 41, 13],
md = [1, 7, 13, 22, 36, 42, 55, 60, 72, 88, 90, 103, 123, 158, 200, 222, 323, 443, 501, 545, 610, 728, 880, 891, 903, 919, 1001, 2011]
lg = (function() {
var result = [];
for (var i = 0; i < 200; i++) {
result.push(~~ (Math.random() * 1000));
}
return result;
}());
Ready to run.
Test | Ops/sec | |
---|---|---|
eval+join |
| ready |
reduce |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.