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
from http://elv1s.ru/files/html+css/removeChildren.html
With an additional test for teh lulz
<script>
element = document.createElement("div");
var i = 2000,
p, j, span;
while (i--) {
p = document.createElement("p");
j = 5;
while (j--) {
span = document.createElement("span");
span.appendChild(document.createTextNode(i * j + "yada-yada"));
p.appendChild(span);
};
element.appendChild(p);
};
document.body.appendChild(element);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
innerHTML |
| ready |
textContent |
| ready |
removeFirstChild |
| ready |
Append to tmp element |
| ready |
remove firstChild (with 1 reflow?) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.