object-notation vs constructor (v21)

Revision 21 of this benchmark created on


Setup

function obj(){}
    obj.prototype = {
      a: 1,
      b: 'test',
      c: false
    }

Test runner

Ready to run.

Testing in
TestOps/sec
object notation
var foo = {
  a: 1,
  b: 'test',
  c: false
};
ready
constructor
var foo = new obj();
ready

Revisions

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