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
A friend of mine was pretty excited to learn that there are possible speed increases associated with shifting bits over the multiplication operator, or by using multiplication over the division operator. However, I wonder if a good compiler or interpreter wouldn't make these optimization choices for you! Let's find out with JS!
Ready to run.
Test | Ops/sec | |
---|---|---|
Multiplication (int) |
| ready |
Bit-Shifting (left) |
| ready |
Division Operator |
| ready |
Division through Multiplying by a Float |
| ready |
Division through bit-shifting right. |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.