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://docs.kissyui.com/kissy/tools/third-party/sizzle.js'></script>
ss = function(selector) {
'use strict';
//if (selector.indexOf(' ') > -1)
// return document.querySelectorAll(selector);
var char = selector.charAt(0);
if (char === '#')
return document.getElementById(selector.substring(1));
if (char === '.')
return document.getElementsByClassName(selector.substring(1));
return document.getElementsByTagName(selector);
}
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.