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

Revision 96 of this benchmark created by Anzor on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Object.create()
o = Object.create(propObj);
ready
new
o = new Obj();
ready

Revisions

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