Basic Object.create vs basic constructor

Benchmark created on


Setup

var o = {
      x: 1
    }
    
    function c() {}
    c.prototype = o;

Test runner

Ready to run.

Testing in
TestOps/sec
Object.create()
var x = Object.create(o);
ready
Constructor
var x = new c();
ready

Revisions

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