Run details:
Mozilla/5.0 (Linux; Android 13; SM-G991B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36
Chrome Mobile 109
Android
Mobile
one year ago
Test name Executions per second
Lodash cloneDeep 183348.0 Ops/sec
Native map deep slice(turns objects into arrays) 2048921.0 Ops/sec
Native JSON parse 163251.6 Ops/sec
Native map deep slice at 0(turns objects into arrays) 2022000.1 Ops/sec
Native map(shallow clone) 3582251.8 Ops/sec
Recursive deep clone 113534.2 Ops/sec
Map deep clone 123079.7 Ops/sec
Object.assign shallow clone 1928358.6 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


;