zepto vs jquery - selectors || just another test (v84)

Revision 84 of this benchmark created by Kyle on


Description

Using jQUery(document.getElementBydId) to see if it's faster than jQuery('#elementId');

Preparation HTML

<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="http://zeptojs.com/zepto.min.js"></script>

<div id="rsvp" class="view" data-view-title="RSVPs">
    <div class="content"></div>
</div>
<div id="chapter_004" class="view" data-view-title="Splendid Corgi Consortium">
    <div class="content"></div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Zepto ID
Zepto('#chapter_004')
ready
jQuery ID
jQuery('#chapter_004')
ready
getElementById
document.getElementById('chapter_004')
ready
Zepto ClassName
Zepto('.view')
ready
jQuery ClassName
jQuery('.view')
ready
getElementsByClassName
document.getElementsByClassName('view')
ready
querySelectorAll
document.querySelectorAll('.view')
ready
jQuery w/ doc.getElementById
jQuery(document.getElementById('chapter_004'));
ready
jQuery w/ doc.getElementsByClassName
jQuery(document.getElementsByClassName('view'))
ready
jQuery w/ doc.querySelectorAll
jQuery(document.querySelectorAll('.view'))
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.