new property vs update

Benchmark created by sushant on


Test runner

Ready to run.

Testing in
TestOps/sec
new property
var obj1 = {};
obj1.a = 1;
obj1.b = 2;
obj1.c = 3;
obj1.d = 4;
obj1.e = 5;
obj1.f = 6;
ready
update property
var obj2 = {
      a : null,
      b : null,
      c : null,
      d : null,
      e : null,
      f : null
    };
obj2.a = 1;
obj2.b = 2;
obj2.c = 3;
obj2.d = 4;
obj2.e = 5;
obj2.f = 6;
 
ready

Revisions

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

  • Revision 1: published by sushant on