Run details:
Mozilla/5.0 (Linux; Android 9; INE-LX2r) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.166 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
3 years ago
Test name Executions per second
Lodash cloneDeep 57248.5 Ops/sec
Native map deep slice(turns objects into arrays) 712610.9 Ops/sec
Native JSON parse 60491.0 Ops/sec
Native map deep slice at 0(turns objects into arrays) 720619.8 Ops/sec
Native map(shallow clone) 1432926.5 Ops/sec
Recursive deep clone 48909.3 Ops/sec
Map deep clone 54146.8 Ops/sec
Object.assign shallow clone 789338.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


;