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

Revision 81 of this benchmark created on


Preparation HTML

<script>
  var o, p = {};

  var Obj = function() {
   this.p = 1;
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Constructor function
o = new Obj();
ready
Object.create() using in-place prototype object
o = Object.create(p);
ready

Revisions

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