Run details:
Mozilla/5.0 (Linux; Android 11; HD1905) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36
Chrome Mobile 101
Android
Mobile
2 years ago
Test name Executions per second
Lodash cloneDeep 119919.5 Ops/sec
Native map deep slice(turns objects into arrays) 1301715.8 Ops/sec
Native JSON parse 76386.6 Ops/sec
Native map deep slice at 0(turns objects into arrays) 272430.0 Ops/sec
Native map(shallow clone) 544294.4 Ops/sec
Recursive deep clone 27033.1 Ops/sec
Map deep clone 29713.7 Ops/sec
Object.assign shallow clone 490250.7 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


;