Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash cloneDeep vs JSON Clonef
(version: 0)
Comparing performance of:
Lodash cloneDeep vs Json clone
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var MyObject = [ { name: "Nausea", termId: "10028813", id: "uf_10047700-10028813_SIDEEFFECT", associationType: null, elementType: "EVENT", status: "CREATED", children: [ { name: "Vomiting", termId: "10047700", id: "uf_10047700-10028813_SIDEEFFECT", associationType: "SIDEEFFECT", elementType: "EVENT", status: "CREATED", children: [ { children: [], name: "Gastrooesophageal reflux disease", elementType: "EVENT", termId: "10066872", status: "CREATE", rowsToMoveUp: 0, associationType: "SYMPTOM/SIGN" } ], rowsToMoveUp: 0, hovered: false } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "ddb_custom_3", associationType: null, elementType: "EVENT", status: "MANUAL", children: [ { name: "Hypersomnia", termId: "10020765", id: "ddb_custom_3", associationType: "CAUSE", elementType: "EVENT", status: "MANUAL", children: [], rowsToMoveUp: 0, hovered: false } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_492", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C09CA03", id: "drugbank_492", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0, hovered: false } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_448", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C09CA03", id: "drugbank_448", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0, hovered: false } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_179", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_179", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_223", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_223", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_163", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_163", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_17", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "G04BD08", id: "drugbank_17", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_26", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C10AA05", id: "drugbank_26", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_81", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "B03BA01", id: "drugbank_81", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_49", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A10AD04", id: "drugbank_49", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Nausea", termId: "10028813", id: "drugbank_9", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C03DA01", id: "drugbank_9", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "ddb_custom_7", associationType: null, elementType: "EVENT", status: "MANUAL", children: [ { name: "Nausea", termId: "10028813", id: "ddb_custom_7", associationType: "CAUSE", elementType: "EVENT", status: "MANUAL", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_458", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C09CA03", id: "drugbank_458", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_220", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_220", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_147", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_147", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_216", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "A02BC01", id: "drugbank_216", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_36", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "G04BD08", id: "drugbank_36", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_80", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "B03BA01", id: "drugbank_80", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 }, { name: "Vomiting", termId: "10047700", id: "drugbank_21", associationType: null, elementType: "EVENT", status: "IMPORTED", children: [ { name: "Not provided", termId: "C03DA01", id: "drugbank_21", associationType: "SIDEEFFECT", elementType: "DRUG", status: "IMPORTED", children: [], rowsToMoveUp: 0 } ], hasOnlyChildrenBelow: false, rowsToMoveUp: 0 } ] var myCopy = null;
Tests:
Lodash cloneDeep
myCopy = _.cloneDeep(MyObject);
Json clone
myCopy = JSON.parse(JSON.stringify(MyObject));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash cloneDeep
Json clone
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 appears that this is not a typical coding challenge, but rather a JSON object containing benchmarking data. If I'm correct, the JSON object contains information about two different benchmark tests: 1. **Lodash cloneDeep**: The benchmark test uses Lodash's `cloneDeep` function to create a deep copy of an object (`MyObject`). 2. **Json clone**: The benchmark test uses the `JSON.parse(JSON.stringify(MyObject))` method to create a copy of the object. The JSON object also contains metadata about the benchmarking results, including: * Browser and device information * Execution frequency per second * Test names There is no specific problem to solve or code to write. The task appears to be to analyze the provided JSON data and extract insights from it. If I had to respond in the requested format, I would say: **Answer**: There is no answer to provide as this is not a traditional coding challenge. The JSON object contains benchmarking data that can be analyzed to understand the performance of Lodash's `cloneDeep` function versus the `JSON.parse(JSON.stringify())` method. Please let me know if there's anything else I can help with!
Related benchmarks:
Lodash 2.2.0 cloneDeep vs JSON Clone w/ large nested object
Lodash cloneDeep vs JSON Clone (Number, Boolean, Object, Array, String, Null)
Lodash cloneDeep vs JSON Clone with Array
cloneDeep vs JSON stringify + parse (long arr)
Lodash cloneDeep vs JSON parse
Comments
Confirm delete:
Do you really want to delete benchmark?