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
<ul id="test" style="overflow-y:scroll; height:100px; font-size:6px">
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js">
</script>
<script>
var jqUl = $("#test");
var lis = [];
for(var i=0; i<100; i++)
lis.push($("<li data-component=\"list-item-"+i+"\" data-component-"+i+" class=\"list-item-"+i+" my-other-class\">List Item " + i + "</li>"));
jqUl.empty().append(lis);
var ul = jqUl[0];
function jq(selector) {
window.noDeadCodeElim = $(selector);
}
function qsa(selector) {
window.noDeadCodeElim = document.querySelectorAll(selector);
}
</script>
window.noDeadCodeElim = null;
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery attribute+value |
| ready |
jQuery class |
| ready |
jQuery classes |
| ready |
jQuery attribute |
| ready |
qsa attribute+value |
| ready |
qsa class |
| ready |
qsa classes |
| ready |
qsa attribute |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.