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
Selectors test of 7 useful javascript frameworks and native querySelectorAll on modern browsers.
Adding YUI3's .all() as it returns a composite object similar to something like jQuery.
Removing all but YUI, jQuery, Sizzle, and native selector engines.
<script src="//cdnjs.cloudflare.com/ajax/libs/sizzle/1.10.13/sizzle.min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
var j1 = jQuery.noConflict();
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js">
</script>
<script>
var j2 = jQuery.noConflict();
</script>
<div id="test">
<div class="testlink">
<a href="#" id="linkone" title="test">test link</a>
</div>
<div class="testmenu">
<ul>
<li class="menuitem itemone">
<a href="#" title="item 1">menu item 1</a>
</li>
<li class="menuitem itemtwo">
<a href="#" title="item 2">menu item 2</a>
</li>
<li class="menuitem itemthree">
not clickable item 3
</li>
</ul>
</div>
</div>
<ol>
<li id="list-1"><strong>Hello</strong></li>
<li id="list-2"><strong>Hello</strong></li>
<li id="list-3"><strong>Hello</strong></li>
<li id="list-4"><strong>Hello</strong></li>
<li id="list-5"><strong>Hello</strong></li>
<li id="list-6"><strong>Hello</strong></li>
<li id="list-7"><strong>Hello</strong></li>
<li id="list-8"><strong>Hello</strong></li>
<li id="list-9"><strong>Hello</strong></li>
<li id="list-10"><strong>Hello</strong></li>
<li id="list-11"><strong>Hello</strong></li>
<li id="list-12"><strong>Hello</strong></li>
<li id="list-13"><strong>Hello</strong></li>
<li id="list-14"><strong>Hello</strong></li>
<li id="list-15"><strong>Hello</strong></li>
<li id="list-16"><strong>Hello</strong></li>
<li id="list-17"><strong>Hello</strong></li>
</ol>
<ol>
<li class="list-1"><strong>Hello</strong></li>
<li class="list-2"><strong>Hello</strong></li>
<li class="list-3"><strong>Hello</strong></li>
<li class="list-4"><strong>Hello</strong></li>
<li class="list-5"><strong>Hello</strong></li>
<li class="list-6"><strong>Hello</strong></li>
<li class="list-7"><strong>Hello</strong></li>
<li class="list-8"><strong>Hello</strong></li>
<li class="list-9"><strong>Hello</strong></li>
<li class="list-10"><strong>Hello</strong></li>
<li class="list-11"><strong>Hello</strong></li>
<li class="list-12"><strong>Hello</strong></li>
<li class="list-13"><strong>Hello</strong></li>
<li class="list-14"><strong>Hello</strong></li>
<li class="list-15"><strong>Hello</strong></li>
<li class="list-16"><strong>Hello</strong></li>
<li class="list-17"><strong>Hello</strong></li>
</ol>
<header>
<em>Em</em>
</header>
<article>Article</article>
<span>Span</span>
<code>Code</code>
<form>
<input type="text" />
</form>
<footer>Footer</footer>
<h1>H1</h1>
<script>
var selectors = ['body', 'div', 'body div', 'div a', 'div > a', 'div[class^=test]', 'div, li, a', '.menuitem', 'li.menuitem', '#linkone', 'div#test', 'a[title*=item]', 'a[title=test]', 'li:nth-child(even)', 'li:nth-child(odd)', 'li:last-child', 'li:first-child'];
var tags = ['html', 'body', 'div', 'ul', 'ol', 'li', 'a', 'strong', 'em', 'header', 'article', 'span', 'code', 'form', 'input', 'footer', 'h1'];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery 1 |
| ready |
jQuery 2 |
| ready |
Sizzle |
| ready |
querySelectorAll |
| ready |
querySelector |
| ready |
getElementById |
| ready |
getElementsByTagName |
| ready |
getElementsByClassName |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.