Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
merge vs mergeWith params
(version: 0)
Comparing performance of:
lodash merge vs lodash mergeWith
Created:
2 years ago
by:
Guest
Go to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Tests:
lodash merge
var a = { a: 'oh', b: 'my', d: 'ss' }; var b = { c: 'goddess', d: 's2s' }; var c = _.merge(a, b); console.log('merge', c)
lodash mergeWith
const mergeFunc = (obj, source) => { return obj ? obj : source; }; var a = { a: 'oh', b: 'my', d: 'ss', non: "baseValue" }; var b = { c: 'goddess', d: 's2s', non: false, }; var c = _.mergeWith(a, b); console.log('mergeWith', c, mergeFunc)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
lodash merge
lodash mergeWith
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0
Browser/OS:
Chrome 135 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
lodash merge
118K/s
lodash mergeWith
47K/s
View exact numbers
Test name
Executions per second
✓
lodash merge
117,575 Ops/sec
lodash mergeWith
46,575 Ops/sec
Related benchmarks
lodash merge vs deepmerge 4.2.2 vs own merge implementation
lodash merge vs custom merge js
Lodash merge vs mergedeep 1
Comments
Confirm delete:
Do you really want to delete benchmark?