Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Linux
Desktop
one year ago
Test name Executions per second
spread ... 677561.8 Ops/sec
esDeepClone2 165903.1 Ops/sec
JSON.parse(JSON.stringify()) 227222.5 Ops/sec
Custom function 210210.4 Ops/sec
Lodash.cloneDeep() 165765.8 Ops/sec
jQuery.extend(true) 172001.5 Ops/sec
Object.assign 636642.1 Ops/sec
chatGptDeepClone 4304828.0 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