Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
lodash.merge + lodash.clone vs cloneDeep v2
(version: 0)
Comparing performance of:
Lodash.merge + Lodash.clone vs Lodash.cloneDeep
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://raw.githubusercontent.com/lodash/lodash/4.17.15-npm/lodash.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:
Lodash.merge + Lodash.clone
_.clone(_.merge(_.clone(obj1), obj2))
Lodash.cloneDeep
_.cloneDeep({...obj1, ...obj2})
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash.merge + Lodash.clone
Lodash.cloneDeep
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):
It seems like you've provided a lengthy input with various JSON objects, benchmark definitions, and results. I'll focus on extracting the relevant information for each test case. **Test Cases** 1. **Lodash.merge + Lodash.clone** * Input: `{"id": "5005", "type": "Sugar"}, {"id": "5007", "type": "Powdered Sugar"}, ...` * Benchmark Definition: `_.clone(_.merge(_.clone(obj1), obj2))` 2. **Lodash.cloneDeep** * Input: `{...obj1, ...obj2}` * Benchmark Definition: `_.cloneDeep({...obj1, ...obj2})` **Latest Benchmark Result** | Test Name | Raw UA String | Browser | Device Platform | Operating System | Executions Per Second | | --- | --- | --- | --- | --- | --- | | Lodash.merge + Lodash.clone | ... | Safari 14 | Desktop | Mac OS X 10.15.7 | 61961.98046875 | | Lodash.cloneDeep | ... | Safari 14 | Desktop | Mac OS X 10.15.7 | 32169.7890625 | Please let me know which specific information you'd like me to extract or what the next steps are!
Related benchmarks:
RFDC clone vs Lodash clone vs JSON Clone
RFDC clone vs clone-deep clone vs Lodash cloneDeep vs JSON Clone
RFDC clone vs Lodash cloneDeep vs JSON Clone vs structured clone
RFDC clone vs Lodash cloneDeep vs JSON Clone : Dup
RFDC clone vs Lodash cloneDeep vs JSON Clone vs Clone
Comments
Confirm delete:
Do you really want to delete benchmark?