lodash merge vs object.assign vs spread vs lodash mergeWithFastest: lodash merge (1.3x faster)
304,625 ops/sec
294,397 ops/sec
260,498 ops/sec
239,614 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| lodash merge | |
| object.assign | |
| spread | |
| lodash mergeWith |
| Test name | Executions per second |
|---|---|
| ✓ lodash merge | 603,145 Ops/sec |
| lodash mergeWith | 206,321 Ops/sec |
| object.assign | 180,550 Ops/sec |
| spread | 140,770 Ops/sec |