Run details:
Mozilla/5.0 (Linux; Android 9; SM-G955F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.99 Mobile Safari/537.36
Chrome Mobile 86
Android
Mobile
4 years ago
Test name Executions per second
Lodash cloneDeep 53259.9 Ops/sec
Native map deep slice(turns objects into arrays) 651664.9 Ops/sec
Native JSON parse 61508.5 Ops/sec
Native map deep slice at 0(turns objects into arrays) 684753.8 Ops/sec
Native map(shallow clone) 1443521.2 Ops/sec
Recursive deep clone 47324.1 Ops/sec
Map deep clone 52591.8 Ops/sec
Object.assign shallow clone 775070.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash cloneDeep

  • Native map deep slice(turns objects into arrays)

  • Native JSON parse

  • Native map deep slice at 0(turns objects into arrays)

  • Native map(shallow clone)

  • Recursive deep clone

  • Map deep clone

  • Object.assign shallow clone


;