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
This is a modified benchmark of: http://jsperf.com/jquery-get-3rd-level-parent/2
Changes made: 1. Removed jQuery parent(3) test as the method does not accept number arguments. 2. Also through BSI into the mix.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://bytes1.dyndns.org/BSI/website-app.js"></script>
<div id="outer">
<div>
<div>
<div id="inner"></div>
</div>
</div>
</div>
<script>
var
jq_inner = $('#inner'),
bsi_inner = BSI.id('inner')
;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery parent() |
| ready |
jQuery parents() |
| ready |
jQuery closest |
| ready |
BSI getAncestor(2) |
| ready |
BSI getAncestor('#outer') |
| ready |
BSI walk parentNode(3) |
| ready |
BSI walk parentNode('#outer') |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.