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
DOM traversal in jQuery within .find()
<div>
<div>
<div>
<div class="a">
<ul class="drop-menu">
<li class="expanded"><a href="#"><span>Expanded</span></a>
<ul class="drop-sub-menu">
<li class="list-item-one"><label for="chkLabelOne"><input type="checkbox" id="chkBoxOne" class="inputValueOne">Check Box One</label></li>
<li class="list-item-two"><label for="chkLabelTwo"><input type="checkbox" id="chkBoxTwo" class="inputValueTwo">Check Box Two</label></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var tt;
</script>
<script>
var tf;
var $parent = $(".a")
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Find with deep tag-specific traversal |
| ready |
Find with tag-specific traversal by tag + class name |
| ready |
Find with tag-specific traversal by class name |
| ready |
Find with tag-specific singular class traversal |
| ready |
Find with tag-specific singular ID traversal |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.