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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"></script>
<script src="https://cdn.rawgit.com/bendc/sprint/master/sprint.min.js"></script>
<script>
function $_(str){
if(str[0] === '#') {
return document.getElementById(str.substring(1));
} else if(str[0] === '.') {
return document.getElementsByClassName(str.substring(1));
} else {
return document.getElementsByTagName(str);
}
}
</script>
<div id="rsvp" class="view" data-view-title="RSVPs">
<div class="content"></div>
</div>
<div id="chapter_004" class="view" data-view-title="Splendid Corgi Consortium">
<div class="content"></div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div id="ops" class="ops"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Ready to run.
Test | Ops/sec | |
---|---|---|
Zepto ID |
| ready |
jQuery ID |
| ready |
getElementById |
| ready |
Zepto ClassName |
| ready |
jQuery ClassName |
| ready |
getElementsByClassName |
| ready |
querySelectorAll |
| ready |
querySelector |
| ready |
jquery |
| ready |
Zepto |
| ready |
Vanilla first |
| ready |
Vanilla all |
| ready |
Sprint ID |
| ready |
Sprint ClassName |
| ready |
Sprint |
| ready |
Query(document.getElementById('chapter_004')) |
| ready |
Sprint(document.getElementById('chapter_004')) |
| ready |
Zepto(document.getElementById('chapter_004')) |
| ready |
$_(id); |
| ready |
Vanilla ID |
| ready |
$_(Class); |
| ready |
$_(DIV); |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.