Run details:
Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-G998B) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.2 Chrome/92.0.4515.166 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
2 years ago
Test name Executions per second
Lodash cloneDeep 65568.8 Ops/sec
Native map deep slice(turns objects into arrays) 753029.6 Ops/sec
Native JSON parse 63520.8 Ops/sec
Native map deep slice at 0(turns objects into arrays) 662631.0 Ops/sec
Native map(shallow clone) 1680354.9 Ops/sec
Recursive deep clone 52691.2 Ops/sec
Map deep clone 84437.2 Ops/sec
Object.assign shallow clone 997499.5 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


;