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
<div id="test"></div>
<div class="testClass"></div>
<span></span>
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="http://raw.github.com/jquery/sizzle/master/dist/sizzle.min.js"></script>
ss = function(selector) {
if (selector.indexOf(' ') > -1)
return document.querySelectorAll(selector);
if (selector.charAt(0) == '#')
return [document.getElementById(selector.substring(1))];
if (selector.charAt(0) == '.')
return Array.prototype.slice.call(document.getElementsByClassName(selector.substring(1)), 0);
return Array.prototype.slice.call(document.getElementsByTagName(selector), 0);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
JQuery |
| ready |
Sizzle |
| ready |
Vanilla getElementsBy* |
| ready |
Vanilla querySelector |
| ready |
pseudo selector |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.