Test Dictionary Mode

JavaScript performance comparison

Revision 19 of this test case created by Nishan Miranda

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  function createObjects() {
     return [{x: 1, y: 2, z: 3}, {a: 1, b: 2, c: 3}];
  }
  function test(obj) {
     var sum, n;
     sum = 0;
     for (n = 0; n < 100; ++n) {
        sum += obj.a + obj.b;
     }
     return sum;
  }
  

};
</script>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
With delete and null
var pair = createObjects();
delete pair[1].c;
pair[1].c = null;
if (test(pair[1]) !== 300) throw "Error in test";
pending…

Revisions

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

0 Comments