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
Reincarnation of: http://www.quirksmode.org/dom/innerhtml.html
With a major update from: http://blog.stevenlevithan.com/archives/faster-than-innerhtml
<div id="writeroot" style="width:1px; height:1px; overflow:hidden;"></div>
<script>
function removeTable() {
document.getElementById('writeroot').innerHTML = '';
}
function fastInnerHTML(el, html) {
var clone = el.cloneNode(false);
clone.innerHTML = html;
el.parentNode.replaceChild(clone, el);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
W3CDOM 1: Create all elements as needed |
| ready |
W3CDOM 2: Create elements once, then clone |
| ready |
tableMethods |
| ready |
INNERHTML 1: concatenate one string |
| ready |
INNERHTML 2: push and join |
| ready |
INNERHTML alternative |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.