Creating an Object with Properties

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Object literal
var o = {
  thing1: 'foo',
  thing2: 'bar'
};
ready
Object then properties
var o = {};
o.thing1 = 'foo';
o.thing2 = 'bar';
 
ready

Revisions

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