Zeigs Mir! : zepto vs jquery - Selektoren (v120)

Revision 120 of this benchmark created by Trallala on


Preparation HTML

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

<div id="trallala" class="view" data-view-title="Trallala">
    <div class="content"></div>
</div>
<div id="zeigsMir" class="view" data-view-title="Trallala">
    <div class="content"></div>
</div>

Setup

function id(id) {
      return document.getElementById(id);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Zepto ID
Zepto('#zeigsMir')
ready
jQuery ID
jQuery('#zeigsMir')
ready
querySelector
document.querySelector('#zeigsMir')
ready
getElementById
document.getElementById('zeigsMir')
ready
jQuery(getElementById)
jQuery(document.getElementById('zeigsMir'))
ready
jQuery(function)
jQuery(id('zeigsMir'))
ready

Revisions

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