Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash Custom Merge
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Lodash
13564371.0 Ops/sec
Me
13933069.0 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
function themeMerge(target, source) { function isObject(item) { return item && typeof item === 'object' && !Array.isArray(item) } let output = Object.assign({}, target) if (isObject(target) && isObject(source)) { Object.keys(source).forEach(key => { if (isObject(source[key])) { if (!(key in target)) Object.assign(output, { [key]: source[key] }) else output[key] = themeMerge(target[key], source[key]) } else { Object.assign(output, { [key]: source[key] }) } }) } return output }
Tests:
Lodash
var a = { a: 'oh', b: 'my' }; var b = { c: 'goddess' }; var c = _.merge(a, b);
Me
var a = { a: 'oh', b: 'my' }; var b = { c: 'goddess' }; var c = themeMerge(a, b);