JavaScript Selectors

Benchmark created by Nathan on


Preparation HTML

<div class="class1 class2"></div>
<span class="class1 class2"></span>
<div class="class1 class2">
  <button id="btn-test" class="btn-class">#btn-test</button>
  <p class="class1"></p>
  <div class="class2"></div>
</div>

<script src="https://fireboltjs.com/firebolt.min.js"></script>
<script src="https://zeptojs.com/zepto.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Firebolt
Firebolt('#btn-test');
Firebolt('.class1');
Firebolt('.class1.class2');
Firebolt('div');
Firebolt('div.class2');
Firebolt('div > button');
ready
Zepto
Zepto('#btn-test');
Zepto('.class1');
Zepto('.class1.class2');
Zepto('div');
Zepto('div.class2');
Zepto('div > button');
ready
jQuery
jQuery('#btn-test');
jQuery('.class1');
jQuery('.class1.class2');
jQuery('div');
jQuery('div.class2');
jQuery('div > button');
ready

Revisions

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