Object.create() vs. constructor vs. object literal

JavaScript performance comparison

Revision 116 of this test case created by dick

Preparation code

  var o, proto = Object.prototype, create = Object.create

  function Obj() {


Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Constructor function
o = new Obj();
Object.create() without descriptors
o = create(proto);

Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:


Add a comment