Selector Engine Speed Test: Quicksand vs jQuery vs Qwery

JavaScript performance comparison

Test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//raw.github.com/ded/qwery/master/qwery.min.js"></script>
<script src="//quicksand.joijs.com/joi/Quicksand/"></script>

<div id="zero">
  <p class="one two three">some content</p>
  <p class="four">other content</p>
</div>
<script>
Benchmark.prototype.setup = function() {
    document.querySelectorAll = null; //we are testing selector engine's performance, not browser's.
};
</script>

Preparation code output

some content

other content

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Quicksand
Quicksand.select('div p');
Quicksand.select('div, p');
Quicksand.select(':not(.two)');
Quicksand.select('p:nth-child(even)');
Quicksand.select('p[class~=three]');
pending…
jQuery
jQuery('div p');
jQuery('div, p');
jQuery(':not(.two)');
jQuery('p:nth-child(even)');
jQuery('p[class~=three]');
pending…
Qwery
qwery('div p');
qwery('div, p');
qwery(':not(.two)');
qwery('p:nth-child(even)');
qwery('p[class~=three]');
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