zepto vs jquery - selectors (v48)

Revision 48 of this benchmark created on


Description

Added native

Preparation HTML

<script src="https://www.cinsoft.net/mylib099-min.js"></script>
<script src="http://code.jquery.com/jquery-2.0.3.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>

Setup

var native = function(e) {
      return document.querySelectorAll(e);
    };
    
    //raw document.getElementById(id) is slightly faster
    native.prototype.id = function(id) {
      return document.getElementById(id);
    };

Test runner

Ready to run.

Testing in
TestOps/sec
Zepto ID
Zepto('#chapter_004')
ready
jQuery2 ID
jQuery('#chapter_004')
ready
Native querySelectorAll
native('#chapter_004');
ready

Revisions

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