Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0
Firefox 72
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
Lodash cloneDeep 101533.8 Ops/sec
Native map deep slice(turns objects into arrays) 8409404.0 Ops/sec
Native JSON parse 178056.8 Ops/sec
Native map deep slice at 0(turns objects into arrays) 8506199.0 Ops/sec
Recursive deep clone 600388.8 Ops/sec
Map deep clone 382119.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)

  • Recursive deep clone

  • Map deep clone


;