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
id vs class vs tag vs.
<p id="foo" class="foo"></p>
<ul id="foo2">
<li class="foo2">foo</li>
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
id |
| ready |
class |
| ready |
tag |
| ready |
$(id) |
| ready |
$(class) |
| ready |
$(tag) |
| ready |
$(class) |
| ready |
$(id).children(class) |
| ready |
$(id).find(class) |
| ready |
$(class, id) |
| ready |
$(tag) |
| ready |
$(id).children(tag) |
| ready |
$(id).find(tag) |
| ready |
$(tag, id) |
| ready |
$(id > tag) |
| ready |
$(tag#id > tag#class) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.