jQuery vs dojo vs mootools - Dom

JavaScript performance comparison

Revision 69 of this test case created by

Preparation code

<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.7/dojo/dojo.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script>
require(['dojo/query!css3'], function(query) {
  dQuery = query;
});

mQuery = $$;
</script>
<div id="container">
  <div class="content">
    <p></p>
  </div>
</div>
    

Preparation code output

<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> <script> require(['dojo/query!css3'], function(query) { dQuery = query; }); mQuery = $$; </script> <div id="container"> <div class="content"> <p></p> </div> </div>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Dojo - Class
var d1 = dQuery(".content");
pending…
jQuery - Class
var j1 = jQuery('.content');
pending…
Mootools - Class
var m1 = mQuery('.content');
pending…
jQuery inside
var j2 = jQuery('.content p');
pending…
Mootools inside
var m2 = mQuery('.content p');
pending…
Dojo inside
var d2 = dQuery(".content p");
pending…
jQuery inside find
var j3 = jQuery('.content').find('p');
pending…
Dojo - ID
var d4 = dQuery("#container");
pending…
jQuery - ID
var j4 = jQuery("#container");
pending…
Mootools - ID
var m4 = document.id("container");
pending…
Dojo inside - ID
var d5 = dQuery("p", "container");
pending…
jQuery inside - ID
var j5 = jQuery("p", "#container");
pending…
Mootools inside - ID
var m5 = document.id("container").getElement("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.

0 Comments