Run details:
Mozilla/5.0 (Linux; U; Android 12; en-US; SM-A536E Build/SP1A.210812.016) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 UCBrowser/13.4.0.1306 Mobile Safari/537.36
UC Browser 13
Android
Mobile
2 years ago
Test name Executions per second
Lodash cloneDeep 116067.2 Ops/sec
Native map deep slice(turns objects into arrays) 1700880.0 Ops/sec
Native JSON parse 104726.6 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1405021.8 Ops/sec
Native map(shallow clone) 2593326.0 Ops/sec
Recursive deep clone 100657.3 Ops/sec
Map deep clone 100793.1 Ops/sec
Object.assign shallow clone 1131421.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


;