Run details:
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
Chrome 130
Mac OS X 10.15.7
Desktop
one month ago
Test name Executions per second
spread ... 936848.1 Ops/sec
esDeepClone2 224928.0 Ops/sec
JSON.parse(JSON.stringify()) 346376.8 Ops/sec
Custom function 227746.6 Ops/sec
Lodash.cloneDeep() 205083.5 Ops/sec
jQuery.extend(true) 131970.5 Ops/sec
Object.assign 859991.5 Ops/sec
chatGptDeepClone 5774720.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • spread ...

  • esDeepClone2

  • JSON.parse(JSON.stringify())

  • Custom function

  • Lodash.cloneDeep()

  • jQuery.extend(true)

  • Object.assign

  • chatGptDeepClone