zepto vs jquery - selectors (v105)

Revision 105 of this benchmark created by Norbert Varga on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.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
Zepto ClassName
Zepto('.view')
ready
jQuery ClassName
jQuery('.view')
ready
jquery
jQuery('#chapter_004 .content')
ready
Zepto
Zepto('#chapter_004 .content')
ready
id querySelector
document.querySelector('#chapter_004')
ready
class querySelector
document.querySelector('.view')
ready
class querySelectorAll
document.querySelectorAll('.view')
ready
getElementById
document.getElementById('chapter_004')
ready
getElementsByClassName
document.getElementsByClassName('view')
ready
jQuery wrap querySelector
jQuery(document.querySelector('#chapter_004'))
ready
jQuery wrap querySelectorAll
jQuery(document.querySelectorAll('.view'))
ready
jQuery wrap getElementById
jQuery(document.getElementById('chapter_004'))
ready
vanilla combined
document.getElementById('chapter_004').getElementsByClassName('view')
ready
jQuery wrap vanilla combined
jQuery(document.getElementById('chapter_004').getElementsByClassName('view'))
ready

Revisions

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