jQuery vs dojo vs mootools - Dom

JavaScript performance comparison

Revision 123 of this test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/dojo.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.4/mootools-yui-compressed.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

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 - Class
var d1 = dQuery('.content');
pending…
jQuery - Class
var j1 = jQuery('.content');
pending…
Mootools - Class
var m1 = mQuery('.content');
pending…
Dojo - inside
var d2 = dQuery('.content p');
pending…
jQuery - inside
var j2 = jQuery('.content p');
pending…
Mootools - inside
var m2 = mQuery('.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. Here’s a list of current revisions for this page:

0 comments

Add a comment