1 import deepMerge from 'deepmerge'
3 import { mergeDeepRight } from 'rambda'
4 import { bench, group, run } from 'tatami-ng'
6 import { generateRandomObject } from './benchmark-utils.mjs'
8 const object = generateRandomObject()
9 const objectToMerge = generateRandomObject()
12 `Deep merge two objects: object with ${
13 Object.keys(object).length
14 } keys, object with ${Object.keys(objectToMerge).length} keys`,
16 bench('lodash merge', (obj = object) => {
17 _.merge(obj, objectToMerge)
19 bench('rambda mergeDeepRight', (obj = object) => {
20 mergeDeepRight(obj, objectToMerge)
22 bench('deepmerge', (obj = object) => {
23 deepMerge(obj, objectToMerge)