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
The hello world books of programming always start you off with i++, however did you know that i++ comes with a bit of overhead? that's because before you can increment i under the hood a new copy of i must be created. Using ++i you don't need that extra copy. i++ will return the current value before incrementing i. ++i returns the incremented version i. This test is to demonstrate that it's faster to use ++i. Get ready get set update your code!
Ready to run.
Test | Ops/sec | |
---|---|---|
start as 0 |
| ready |
start as 1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.