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 type="text/javascript" src="http://yui.yahooapis.com/combo?2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="test">
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>
</div>
function nativeGet(className, tag, root) {
root = root || document;
if ("getElementsByClassName" in root) {
return root.getElementsByClassName(className);
}else{
return YAHOO.util.Dom.getElementsByClassName(className, tag, root);
}
}
function jqueryGet(className, tag, root) {
root = root || false;
if (root) {
return $(root).find("."+className);
}else{
return $("."+className);
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
YUI |
| ready |
Native |
| ready |
jQuery |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.