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 think we can all agree this pattern is sexy, but how well does it perform?
Note that this assumes that Array#indexOf
is available, which may not be the case in old browsers.
var foo = 101;
Ready to run.
Test | Ops/sec | |
---|---|---|
Multiple ||, 3 elements, no match |
| ready |
Array#indexOf, 3 elements, no match |
| ready |
Multiple ||, 100 elements, no match |
| ready |
Array#indexOf, 100 elements, no match |
| ready |
Multiple ||, 3 elements, match |
| ready |
Array#indexOf, 3 elements, match |
| ready |
Multiple ||, 101 elements, match |
| ready |
Array#indexOf, 101 elements, match |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.