Run details:
Mozilla/5.0 (Linux; Android 10; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36
Chrome Mobile 85
Android
Mobile
4 years ago
Test name Executions per second
Lodash cloneDeep 105950.4 Ops/sec
Native map deep slice(turns objects into arrays) 1120473.9 Ops/sec
Native JSON parse 100339.8 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1111241.1 Ops/sec
Native map(shallow clone) 2225854.0 Ops/sec
Recursive deep clone 78918.6 Ops/sec
Map deep clone 85286.9 Ops/sec
Object.assign shallow clone 1254664.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


;