Test name | Executions per second |
---|---|
lodash merge | 2677616.8 Ops/sec |
object.assign | 4670102.0 Ops/sec |
spread | 19079814.0 Ops/sec |
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
var a = { a: 'oh', b: 'my' };
var b = { c: 'goddess' };
var c = _.merge(a, b);
var a = { a: 'oh', b: 'my' };
var b = { c: 'goddess' };
var c = Object.assign(a, b);
var a = { a: 'oh', b: 'my' };
var b = { c: 'goddess' };
var c = { a, b };