Run details:
Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-G970N) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/20.0 Chrome/106.0.5249.126 Mobile Safari/537.36
Chrome Mobile 106
Android
Mobile
one year ago
Test name Executions per second
Lodash cloneDeep 99883.2 Ops/sec
Native map deep slice(turns objects into arrays) 1845853.9 Ops/sec
Native JSON parse 98280.3 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1801187.1 Ops/sec
Native map(shallow clone) 3160311.5 Ops/sec
Recursive deep clone 77179.0 Ops/sec
Map deep clone 79974.6 Ops/sec
Object.assign shallow clone 1261872.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


;