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 out the theories behind React.js. Will batch updates on a DOM tree be faster than replacing the entire DOM tree à la .innerHTML or similar?
<div id="test-dom-root">
<h1>
Testing the Theories of <a class="react" href="http://facebook.github.io/react/">React</a>
</h1>
<p>
How will the wholesale swap of the DOM tree fair against the powerful <a class="vd" href="http://google.com/search?q=react+virtual+dom">virtual DOM</a>.
</p>
</div>
var tree = document.querySelector('#test-dom-root'),
anchors = tree.querySelectorAll('a'),
randomId = Math.round(Math.random() * 1000);
Ready to run.
Test | Ops/sec | |
---|---|---|
.innerHTML |
| ready |
Batch updates |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.