beget vs Object.create

Benchmark created on


Preparation HTML

<script>
var beget = (function() {
    var F = function(){};
    return function(proto) {
        F.prototype = proto;
        return new F();
    };
}());

var testObj = window.navigator;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
beget
var res = beget(testObj);
ready
Object.create
var res = Object.create(testObj);
ready

Revisions

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