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 107148.7 Ops/sec
Native map deep slice(turns objects into arrays) 1157484.0 Ops/sec
Native JSON parse 134714.2 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1355095.1 Ops/sec
Native map(shallow clone) 1865562.5 Ops/sec
Recursive deep clone 68498.4 Ops/sec
Map deep clone 82103.0 Ops/sec
Object.assign shallow clone 1304816.8 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


;