jQuery vs dojo vs mootools vs jQuery 1.7.2 w/ VanillaJS Benchmark

JavaScript performance comparison

Revision 113 of this test case created

Info

Newest Dojo and Jquery and Mootools with VanillaJS benchmark

Preparation code

<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js">
</script>
<script src="//www.cinsoft.net/mylib099-min.js">
</script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js">
</script>
<script>
  require(['dojo/query!css3'], function(query) {
    dQuery = query;
  });
</script>
<div class="section">
  <div class="age">
  </div>
  <div class="age2">
  </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
var d1 = dojo.query(".section");
pending…
jQuery
var j1 = jQuery('.section');
pending…
Mootols
var m1 = $$('.section');
pending…
jQuery - inside
var j2 = jQuery('.section .age2');
pending…
Mootools - inside
var m2 = $$('.section .age2');
pending…
Dojo - inside
var d2 = dojo.query(".section .age2");
pending…
YUI
YUI().use('node', function(Y) {
  var y1 = Y.one('.section');
});
pending…
YUI Inside
YUI().use('node', function(Y) {
  var y1 = Y.one('.section .age2');
});
pending…
dojo 2
var d1 = dQuery(".section");
pending…
dojo inside2
var d2 = dQuery(".section .age2");
pending…
repeat test 1
var d1 = dojo.query(".section");
pending…
VanillaJS
var d1 = document.getElementsByClassName('section');
pending…
VanillaJS Inside
var d1 = document.getElementsByClassName('section'),
    d2 = [];

for (var i = 0; i < d1.length; ++i) {
  d2.push(d1[i].getElementsByClassName('age2'));
}
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