Object.create vs extend

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

var source = { foo: 'bar', bar: 'baz' },
    additional = { baz: "quux" };

Test runner

Ready to run.

Testing in
TestOps/sec
O.create
var target = Object.create( source );
$.extend( target, additional );
ready
$.extend
$.extend({}, source, additional );
ready

Revisions

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