zepto vs jquery - selectors

JavaScript performance comparison

Revision 99 of this test case created by Andreas Danielsson

Preparation code

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.min.js"></script>


<div id="chapter_004" class="view">
    <div class="content"></div>
</div>
    

Preparation code output

<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.min.js"></script> <div id="chapter_004" class="view"> <div class="content"></div> </div>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Zepto ID
Zepto('#chapter_004')
pending…
getElementById
document.getElementById('chapter_004')
pending…
jQuery(getElementById)
jQuery(document.getElementById('chapter_004'))
pending…
jQuery(function)
jQuery(id('chapter_004'))
pending…
id
id('chapter_004')
pending…
jQuery ID
jQuery('#chapter_004')
pending…
querySelector
document.querySelector('#chapter_004')
pending…
querySelectorAll
document.querySelectorAll('#chapter_004')
pending…

Compare results of other browsers

Revisions

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

0 Comments