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
Comparing FIVE leftpad implementations!
while: complexity with ropes O(n), without O(n^2). memory usage O(n)
Russian peasant: complexity with ropes O(log n), without O(n). memory usage O(log n) to O(n) depending on the implementation
join (there's two of them): complexity O(n), memory usage O(n)
repeat: complexity depends on VM implementation, memory usage too. could be the same as the Russian peasant algorithm or the same as while, but more optimized
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| while | | ready |
| Russian peasant | | ready |
| push and join | | ready |
| join empty | | ready |
| repeat | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.