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 = 42,
x = 1,
y = 2,
z = 42,
arr1 = [x, y],
arr2 = [x, y, z],
obj1 = {x: 1, y: 1},
obj2 = {x: 1, y: 1, z: 1};
Ready to run.
Test | Ops/sec | |
---|---|---|
Multiple ||, no match |
| ready |
Array#indexOf, no match |
| ready |
Multiple ||, match |
| ready |
Array#indexOf, match |
| ready |
x in {}, no match |
| ready |
x in {}, match |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.