Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
spread ... 1353379.5 Ops/sec
esDeepClone2 413689.0 Ops/sec
JSON.parse(JSON.stringify()) 511418.2 Ops/sec
Custom function 511162.0 Ops/sec
Lodash.cloneDeep() 384259.1 Ops/sec
jQuery.extend(true) 0.0 Ops/sec
Object.assign 1281539.4 Ops/sec
chatGptDeepClone 10833165.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