Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Deep merge lodash vs ramda vs deepmerge latest
(version: 0)
Comparing performance of:
Ramda.mergeDeepRight vs Lodash.merge vs deepmerge
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="//cdn.jsdelivr.net/npm/ramda@latest/dist/ramda.min.js"></script> <script src="https://raw.githubusercontent.com/lodash/lodash/4.17.19/npm-package/lodash.js"></script> <script src="https://unpkg.com/deepmerge/dist/umd.js"></script>
Script Preparation code:
var obj1 = [ { "id": "0001", "type": "donut", "name": "Cake", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Regular" }, { "id": "1002", "type": "Chocolate" }, { "id": "1003", "type": "Blueberry" }, { "id": "1004", "type": "Devil's Food" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Glazed" }, { "id": "5005", "type": "Sugar" }, { "id": "5007", "type": "Powdered Sugar" }, { "id": "5006", "type": "Chocolate with Sprinkles" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] }, { "id": "0002", "type": "donut", "name": "Raised", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Regular" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Glazed" }, { "id": "5005", "type": "Sugar" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] }, { "id": "0003", "type": "donut", "name": "Old Fashioned", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Regular" }, { "id": "1002", "type": "Chocolate" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Glazed" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] } ] var obj2 = [ { "id": "0001", "type": "donut", "name": "Cake", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Overwritten" }, { "id": "1002", "type": "Chocolate" }, { "id": "1003", "type": "Overwritten" }, { "id": "1004", "type": "Devil's Food" } ] }, "topping": [ { "id": "5001", "type": "Overwritten" }, { "id": "5002", "type": "Overwritten" }, { "id": "5005", "type": "Sugar" }, { "id": "5007", "type": "Powdered Sugar" }, { "id": "5006", "type": "Chocolate with Sprinkles" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Overwritten" } ] }, { "id": "0002", "type": "Overwritten", "name": "Raised", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Overwritten" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Overwritten" }, { "id": "5005", "type": "Sugar" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] }, { "id": "0003", "type": "Overwritten", "name": "Old Fashioned", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Overwritten" }, { "id": "1002", "type": "Chocolate" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Glazed" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] } ]
Tests:
Ramda.mergeDeepRight
R.mergeDeepRight(obj1, obj2)
Lodash.merge
_.merge(obj1, obj2)
deepmerge
deepmerge(obj1, obj2)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Ramda.mergeDeepRight
Lodash.merge
deepmerge
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
The benchmark results suggest that the execution times for each library are as follows: 1. Ramda.mergeDeepRight: 74827.5859375 executions per second 2. Lodash.merge: 34875 executions per second 3. deepmerge: 13026.392578125 executions per second Based on these results, it appears that Ramda.mergeDeepRight is the fastest library, followed by Lodash.merge and then deepmerge. Here's a rough estimate of the relative performance differences: * Ramda.mergeDeepRight is approximately 2.15 times faster than Lodash.merge * Ramda.mergeDeepRight is approximately 5.71 times faster than deepmerge Keep in mind that these results are based on a single benchmarking test and may not reflect real-world performance in all scenarios.
Related benchmarks:
Deep merge lodash vs ramda vs deepmerge vs json clone
Deep merge lodash 4.6.2 vs ramda vs deepmerge
Deep merge lodash vs ramda vs deepmerge vs json clone 3
Object Cloning Comparsion
Deep merge lodash vs ramda vs Immutable with multiple objects
Comments
Confirm delete:
Do you really want to delete benchmark?