Run details:
Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/114.0 Firefox/114.0
Firefox Mobile 114
Android
Mobile
one year ago
Test name Executions per second
Lodash cloneDeep 178373.3 Ops/sec
Native map deep slice(turns objects into arrays) 9597423.0 Ops/sec
Native JSON parse 255896.9 Ops/sec
Native map deep slice at 0(turns objects into arrays) 8414343.0 Ops/sec
Native map(shallow clone) 20109754.0 Ops/sec
Recursive deep clone 1321497.2 Ops/sec
Map deep clone 1320666.2 Ops/sec
Object.assign shallow clone 16483191.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


;