new vs Object.create (v4)

Revision 4 of this benchmark created by New vs create with ctors on


Preparation HTML

<script>
  var C1 = {
    a: 0,
    b: {},
    c: [],
    C1: function(x) {
      this.a = x
    }
  },
      C2 = function(x) {
      this.a = x;
      this.b = {};
      this.c = [];
      }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Create
var object = Object.create(C1);
object.C1(Math.random());
ready
New
var object = new C2(Math.random());
ready

Revisions

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