Run details:
Mozilla/5.0 (Linux; Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Mobile Safari/537.36
Chrome Mobile 101
Android
Mobile
2 years ago
Test name Executions per second
Lodash cloneDeep 124788.1 Ops/sec
Native map deep slice(turns objects into arrays) 1585497.5 Ops/sec
Native JSON parse 144675.8 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1599359.8 Ops/sec
Native map(shallow clone) 3191708.2 Ops/sec
Recursive deep clone 94048.4 Ops/sec
Map deep clone 100786.9 Ops/sec
Object.assign shallow clone 1696584.1 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


;