Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36
Chrome Mobile 113
Android
Mobile
one year ago
Test name Executions per second
spread ... 776330.5 Ops/sec
esDeepClone2 177404.6 Ops/sec
JSON.parse(JSON.stringify()) 262365.4 Ops/sec
Custom function 238987.1 Ops/sec
Lodash.cloneDeep() 191062.2 Ops/sec
jQuery.extend(true) 187057.2 Ops/sec
Object.assign 736912.8 Ops/sec
chatGptDeepClone 4846238.5 Ops/sec
structuredClone 129947.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

  • structuredClone