Run details:
Mozilla/5.0 (Linux; Android 7.1.1; Aquaris X5 Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.117 Mobile Safari/537.36
Chrome Mobile 80
Android 7.1.1
Mobile
4 years ago
Test name Executions per second
Lodash cloneDeep 53325.8 Ops/sec
Native map deep slice(turns objects into arrays) 693875.9 Ops/sec
Native JSON parse 53435.1 Ops/sec
Native map deep slice at 0(turns objects into arrays) 702960.7 Ops/sec
Native map(shallow clone) 1332914.9 Ops/sec
Recursive deep clone 45732.8 Ops/sec
Map deep clone 50007.6 Ops/sec
Object.assign shallow clone 712656.4 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


;