Dojo vs. jQuery vs. ExtJS

JavaScript performance comparison

Revision 14 of this test case created

Info

Simple test to benchmark variable allocation on inner and outer items.

Preparation code

<script src="//cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"></script>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js"></script>

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…
Dojo Inside
var d2 = dojo.query(".section .age2");
pending…
jQuery
var j1 = jQuery('.section');
pending…
jQuery Inside
var j2 = jQuery('.section .age2');
pending…
ExtJS
var e1 = Ext.get('.section');
pending…
ExtJS Inside
var e2 = Ext.get('.section .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:

3 comments

Daniel Klein commented :

THIS TEST IS WRONG.

Ext.get works only on element's ID. Variable "e2" is always NULL. To get elements by class use:

Ext.query('.section')

Ext.get(".section") is like:

document.getElementById(".section") --> null

.. so it will be the fastest :)

Daniel Klein commented :

Sorry that should be:

Ext.dom.Query.select(".section")

Dylan commented :

Revision 10 of this test was for more accurate in how Dojo is tested... This version tests an older version of Dojo, and is simply not accurate.

Add a comment