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
Fixed issues with the tests which causes incorrect results:
All but the native selector were not actually selecting anything since they were just querying the index.
dojo test was returning the query object rather then actually executing the callback block
Rev.47:
Updated YUI to v3.8.0
Changed to use Y.all, which is consistent with other implementations.
Made more fair to YUI by calling .use() once and storing it, as opposed to previous behavior which caused .use() to be called on every benchmark sample. (Someone else might want to do the same for Dojo; it looks like it's being required on every sample as well.)
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://yui.yahooapis.com/3.8.0/build/yui/yui-min.js"></script>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"></script>
<div id="test">
<div class="testlink">
<a href="#" id="linkone" title="test">test link</a>
</div>
<div class="testmenu">
<ul>
<li class="menuitem itemone">
<a href="#" title="item 1">menu item 1</a>
</li>
<li class="menuitem itemtwo">
<a href="#" title="item 2">menu item 2</a>
</li>
<li class="menuitem itemthree">
not clickable item 3
</li>
</ul>
</div>
</div>
var selectors = ['body', 'div', 'body div', 'div a', 'div > a', 'div[class^=test]', 'div, li, a', '.menuitem', 'li.menuitem', '#linkone', 'div#test', 'a[title*=item]', 'a[title=test]', 'li:nth-child(even)', 'li:nth-child(odd)', 'li:last-child', 'li:first-child'], Y = YUI().use('node');
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery v1.8.2 |
| ready |
YUI v3.8.0 |
| ready |
Dojo 1.8 |
| ready |
querySelectorAll |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.