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 ... 591987.9 Ops/sec
esDeepClone2 144790.5 Ops/sec
JSON.parse(JSON.stringify()) 228733.1 Ops/sec
Custom function 215325.0 Ops/sec
Lodash.cloneDeep() 196960.6 Ops/sec
jQuery.extend(true) 175280.4 Ops/sec
Object.assign 600920.4 Ops/sec
chatGptDeepClone 3946041.2 Ops/sec
structuredClone 130603.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