Run details:
Mozilla/5.0 (Linux; Android 11; POCO F2 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.73 Mobile Safari/537.36
Chrome Mobile 99
Android
Mobile
2 years ago
Test name Executions per second
Lodash cloneDeep 164862.7 Ops/sec
Native map deep slice(turns objects into arrays) 1633156.8 Ops/sec
Native JSON parse 114491.9 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1651425.0 Ops/sec
Native map(shallow clone) 3149347.2 Ops/sec
Recursive deep clone 100877.8 Ops/sec
Map deep clone 109442.1 Ops/sec
Object.assign shallow clone 1681972.9 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


;