Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Linux
Desktop
one year ago
Test name Executions per second
spread ... 592908.8 Ops/sec
esDeepClone2 167921.9 Ops/sec
JSON.parse(JSON.stringify()) 183777.5 Ops/sec
Custom function 218765.2 Ops/sec
Lodash.cloneDeep() 166517.6 Ops/sec
jQuery.extend(true) 166016.2 Ops/sec
Object.assign 592058.8 Ops/sec
chatGptDeepClone 4300095.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