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
In this test we will do various ways of detecting if a number is negative or positive to see which is faster.
var n1 = -1,
n2 = 0,
n3 = 1,
n4 = -1e16;
n5 = 1e16;
Ready to run.
Test | Ops/sec | |
---|---|---|
Less Than Operator |
| ready |
Bit Shifting |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.