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
After reading http://www.learningjquery.com./2011/12/using-jquerys-pushstack-for-reusable-dom-traversing-methods I was wondering if this approach gave any advantage over caching selectors.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<ul class="first">
<li class="foo">
list item
<span class="number">
1
</span>
</li>
<li>
list item
<span class="number">
2
</span>
</li>
<li class="bar">
list item
<span class="number">
3
</span>
</li>
</ul>
<ul class="second">
<li class="foo">
list item 1
</li>
<li>
list item 2
</li>
<li class="bar">
list item 3
</li>
</ul>
Ready to run.
Test | Ops/sec | |
---|---|---|
.end() |
| ready |
Cached |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.