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