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
It's been my experience that since nodeIterator is "deep only" the need to filter by parent makes it slow and wasteful since it's walking text nodes even if your SHOW_BY irestricted to elements. Worse still it returns the "root" tag as part of the set.
It is NOT a useful construct and really serves no purpose for element walking with firstElementChild and nextElementSibling available.
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 | |
---|---|---|
DOM Walking |
| ready |
nodeIterator |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.