jQuery vs dojo vs mootools - Dom

JavaScript performance comparison

Revision 4 of this test case created by Arian

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<script src="https://github.com/mootools/slick/raw/master/Source/Slick.Parser.js"></script>
<script src="https://github.com/mootools/slick/raw/master/Source/Slick.Finder.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"></script>

<div class="content">
<p></p>
</div>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Dojo
var d1 = dojo.query(".content");
pending…
jQuery
var j1 = jQuery('.content');
pending…
Slick
var m1 = Slick.search('.content');
pending…
jQuery - inside
var j2 = jQuery('.content p');
pending…
Slick - inside
var m2 = Slick.search('.content p');
pending…
Dojo - inside
var d2 = dojo.query(".content p");
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:

1 comment

Thomas Aylott commented :

This test is completely worthless. A proper benchmark requires a decently large and complex document to search. It also requires verifying that the results are what you expect.

It doesn't matter how quickly you get the wrong answer™

Add a comment