Tests:
spread ...
esDeepClone2
JSON.parse(JSON.stringify())
Custom function
Lodash.cloneDeep()
jQuery.extend(true)
Object.assign
chatGptDeepClone
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
one year ago )
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser/OS:
Chrome 130 on Mac OS X 10.15.7
View result in a separate tab
Embed
JSON.parse(JSON.stringify())
346K/s
Lodash.cloneDeep()
205K/s
jQuery.extend(true)
132K/s
View exact numbers
Test name
Executions per second
✓
chatGptDeepClone
5,774,720 Ops/sec
spread ...
936,848 Ops/sec
Object.assign
859,992 Ops/sec
JSON.parse(JSON.stringify())
346,377 Ops/sec
Custom function
227,747 Ops/sec
esDeepClone2
224,928 Ops/sec
Lodash.cloneDeep()
205,083 Ops/sec
jQuery.extend(true)
131,971 Ops/sec
Do you really want to delete benchmark?