BSI vs Dojo vs. jQuery vs. ExtJS (.class)

JavaScript performance comparison

Revision 88 of this test case created by dgn

Info

Preparation code

<script  src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-all.js"></script>
 
<script>
Benchmark.prototype.setup = function() {
    var store = Ext.create('Ext.data.Store', {
     fields: ['id', 'name', 'age'],
     data: [
       { id: 1, name: 'Dan', age: 32 },
       { id: 2, name: 'Svend', age: 12 },
       { id: 3, name: 'Adam', age: 35 },
       { id: 4, name: 'Muhammed', age: 31 },
       { id: 5, name: 'Ronnie', age: 32 },
       { id: 6, name: 'Taylor', age: 42 },
       { id: 7, name: 'Niquah', age: 98 }
     ]
    });
   
    var records = [];
   
    store.each(function(r) {
     records[records.length] = r;
    });
};
</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
getData
var data, out = 0;

for(var i = 0, j = records.length; i < j; i++) {
   data = records[i].getData();

   if(data.id == 3 || data.name == 'Dan')
     out++;
}
pending…
get
var record, out = 0;

for(var i = 0, j = records.length; i < j; i++) {
   record = records[i];

   if(record.get('id') == 3 || record.get('name') == 'Dan')
     out++;
}
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