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="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://zeptojs.com/zepto.min.js"></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>
var getById = function(id) {
return document.getElementById(id)
},
getByClass = function(cls) {
return document.getElementsByClassName(cls)
},
querySelectorAll = function(query) {
return document.querySelectorAll(query)
},
querySelector = function(query) {
return document.querySelector(query)
};
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 |
getElementById cached |
| ready |
getElementsByClassName cached |
| ready |
querySelectorAll cached |
| ready |
querySelector cached |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.