Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/116.0.5845.103 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 116
iOS 16.6
Mobile
one year ago
Test name Executions per second
Lodash cloneDeep 383842.2 Ops/sec
Native map deep slice(turns objects into arrays) 5790403.5 Ops/sec
Native JSON parse 692582.2 Ops/sec
Native map deep slice at 0(turns objects into arrays) 5498877.5 Ops/sec
Native map(shallow clone) 9663611.0 Ops/sec
Recursive deep clone 370148.0 Ops/sec
Map deep clone 391145.0 Ops/sec
Object.assign shallow clone 5534923.0 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


;