Run details:
Mozilla/5.0 (Linux; Android 12; 2201116SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
Lodash cloneDeep 129250.8 Ops/sec
Native map deep slice(turns objects into arrays) 1630376.0 Ops/sec
Native JSON parse 128836.5 Ops/sec
Native map deep slice at 0(turns objects into arrays) 1587258.4 Ops/sec
Native map(shallow clone) 3043192.0 Ops/sec
Recursive deep clone 93502.3 Ops/sec
Map deep clone 100749.0 Ops/sec
Object.assign shallow clone 1666678.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


;