chained object access

JavaScript performance comparison

Test case created by acatl

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var com = {
      app: {
         module: {
            string1: "string1",
            string2: "string2",
            string3: "string3"
         }
      }
    };
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
direct
com.app.module.string1 = "val1";
com.app.module.string2 = "val2";
com.app.module.string3 = "val3";
pending…
caching
module = com.app.module
module.string1 = "val1";
module.string2 = "val2";
module.string3 = "val3";
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment