Ext js reference vs lookup

JavaScript performance comparison

Test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js">
</script>
<script src="//cdn.sencha.io/ext-4.1.0-gpl/ext-all.js">
</script>
<script>
Benchmark.prototype.setup = function() {
    abc = Ext.create('Ext.Panel', {
      id : "pie"
    });
    ref = {
      obj: abc
    }
};
</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
Ext.getCmp
Ext.getCmp("pie");
pending…
Reference ( ref.obj )
ref.obj;
pending…
Ext.get
Ext.get("pie");
pending…
ComponentQuery
Ext.ComponentQuery.query('#pie');
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