Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0
Firefox 104
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
lodash cloneDeep 1363696.9 Ops/sec
JSON.parse(JSON.stringify()) 643398.6 Ops/sec
recursiveDeepCopy 4206952.0 Ops/sec
fastest-json-copy npm package 5352572.5 Ops/sec
jsondiffpatch.clone() 4010863.2 Ops/sec
rfdc 5905467.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • jsondiffpatch.clone()

  • rfdc