Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Mac OS X 10.15.7
Desktop
2 years ago
Benchmark.js
JSON.parse(JSON.stringify())
294K/s
Lodash.cloneDeep()
216K/s
jQuery.extend(true)
196K/s
View exact numbers
| Test name |
Executions per second |
|
✓
chatGptDeepClone
|
6,165,695 Ops/sec |
|
spread ...
|
868,696 Ops/sec |
|
Object.assign
|
817,490 Ops/sec |
|
JSON.parse(JSON.stringify())
|
294,145 Ops/sec |
|
Custom function
|
272,833 Ops/sec |
|
esDeepClone2
|
228,574 Ops/sec |
|
Lodash.cloneDeep()
|
216,360 Ops/sec |
|
jQuery.extend(true)
|
195,583 Ops/sec |
Tests:
-
spread ...
-
esDeepClone2
-
JSON.parse(JSON.stringify())
-
Custom function
-
Lodash.cloneDeep()
-
jQuery.extend(true)
-
Object.assign
-
chatGptDeepClone