Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash clone deep performance
(version: 0)
Comparing performance of:
lodash clone vs Json parse stringify
Created:
5 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 = { description: 'Creates a deep copy of source, which should be an object or an array.', myNumber: 123456789, myBoolean: true, jayson: { stringify: 'JSON.stringify() method converts a JavaScript value to a JSON string....', parse: 'JSON.parse() method parses a JSON string...', more: { less: { msg: 'Benis' } } }, penis: 'Benis' };
Tests:
lodash clone
const clone = _.cloneDeep(MyObject)
Json parse stringify
const clone = 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 clone
Json parse stringify
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!
Related benchmarks:
Lodash cloneDeep vs JSON Clone with huge object
Lodash deep clone vs JSON.stringfy
Lodash deeper clone vs Spread Clone
Clone deep
cloneDeep vs JSON stringify + parse (long arr)
Comments
Confirm delete:
Do you really want to delete benchmark?