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
<p>hellw world</p>
<div>
<p>Ipsum</p>
<p>Dolor</p>
</div>
<p>Griner</p>
<p>Mere</p>
<script>
window.selectors = ["body", "div", "body div", "div p", "div > p", "div + p", "div ~ p" /*, "div[class^=exa][class$=mple]", "div p a", "div, p, a", ".note", "div.example", "ul .tocline2", "div.example, div.note", "#title", "h1#title", "div #title", "ul.toc li.tocline2", "ul.toc > li.tocline2", "h1#title + div > p", "h1[id]:contains(Selectors)", "a[href][lang][class]", "div[class]", "div[class=example]", "div[class^=exa]", "div[class$=mple]", "div[class*=e]", "div[class|=dialog]", "div[class!=made_up]", "div[class~=example]", "div:not(.example)", "p:contains(selectors)", "p:nth-child(even)", "p:nth-child(2n)", "p:nth-child(odd)", "p:nth-child(2n+1)", "p:nth-child(n)", "p:only-child", "p:last-child", "p:first-child"*/ ];
var qsaCall = function(selector, element) {
return document.querySelectorAll.call(element || document, selector);
};
var qsa = function(selector, element) {
return (element || document).querySelectorAll(selector);
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
qsaCall |
| ready |
qsa |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.