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
Testing the performance of all the different ways we can loop through an iterable collection of DOM Nodes.
let ul = document.createElement("ul");
for (let i = 0x400; i--; ul.appendChild(document.createElement("li")).textContent = i);
ul.remove();
delete ul;
Ready to run.
Test | Ops/sec | |
---|---|---|
Array.forEach |
| ready |
For..of |
| ready |
"Old School" for(index) |
| ready |
"Old School" for(index) with single [index] |
| ready |
For on assignment |
| ready |
While assignment |
| ready |
if/do/while DOM walk |
| ready |
for DOM walk |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.