Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Windows
Desktop
one year ago
Test name Executions per second
spread ... 1075314.5 Ops/sec
esDeepClone2 271169.3 Ops/sec
JSON.parse(JSON.stringify()) 329719.3 Ops/sec
Custom function 322793.2 Ops/sec
Lodash.cloneDeep() 248310.8 Ops/sec
jQuery.extend(true) 229786.8 Ops/sec
Object.assign 913262.8 Ops/sec
chatGptDeepClone 6703405.5 Ops/sec
structuredClone 178575.3 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

  • structuredClone