Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Linux
Desktop
one year ago
Test name Executions per second
Lodash cloneDeep 2941.1 Ops/sec
Native JSON parse 4170.4 Ops/sec
Recursive deep clone 3451.7 Ops/sec
Object.assign shallow clone 0.0 Ops/sec
structuredClone 3954.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash cloneDeep

  • Native JSON parse

  • Recursive deep clone

  • Object.assign shallow clone

  • structuredClone