Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash deep clone vs JSON parse stringify
(version: 1)
Comparing performance of:
JSON vs clone deep
Created:
one year ago
by:
Registered User
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:
window.dater = { name: 'test', arr: [1, 2, 3, 4, 5], innerObj: { name: 'Test Inner', innerArr: [2, 4, 5, 6], isDeleted: false, }, sigh: true, };
Tests:
JSON
const res = JSON.parse(JSON.stringify(window.dater))
clone deep
const result = _.cloneDeep(window.dater)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
JSON
clone deep
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
5 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
JSON
2061828.0 Ops/sec
clone deep
799677.0 Ops/sec
Related benchmarks:
Lodash 3 cloneDeep
GET vs _GET
Lodash deep clone (v4.17.20) vs JSON.stringfy
Lodash clone vs JSON parse stringify
Lodash clone comparison vs JSON comparison
Lodash vs Javascript benchmarks DrewM4
cloneDeep vs JSON stringify + parse
Lodash vs structured Clone vs json parse
Lodash 4.17.21 isEqual vs JSON stringify
Comments
Confirm delete:
Do you really want to delete benchmark?