YUI3 vs. jQuery vs. Sizzle vs. Native selector test

JavaScript performance comparison

Revision 60 of this test case created

Preparation code

<script src="//www.cinsoft.net/mylib099-min.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/sizzle/2.0.0/sizzle.js"></script>
<script src="http://yui.yahooapis.com/3.8.1/build/yui/yui-min.js"></script>
<script>
  Y = YUI().use('node');
</script>

<section class="target-me" name="donuts">.target-me</section>
<section class="target-me">.target-me</section>
<section class="target-me" name="candy">.target-me</section>

Preparation code output

.target-me
.target-me
.target-me

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
jQuery
$('.target-me');
pending…
YUI3 Node
Y.all('.target-me');
pending…
YUI3 Selector
Y.Selector.query('.target-me');
pending…
Sizzle
Sizzle('.target-me');
pending…
Native querySelectorAll
document.querySelectorAll('.target-me');
pending…
Native querySelector
document.querySelector('.target-me');
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. Here’s a list of current revisions for this page:

0 comments

Add a comment