Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
spread ... 570961.9 Ops/sec
esDeepClone2 159198.1 Ops/sec
JSON.parse(JSON.stringify()) 223938.8 Ops/sec
Custom function 222100.5 Ops/sec
Lodash.cloneDeep() 172171.6 Ops/sec
jQuery.extend(true) 175867.5 Ops/sec
Object.assign 556049.9 Ops/sec
chatGptDeepClone 4221378.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