Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
lodash cloneDeep 506591.1 Ops/sec
JSON.parse(JSON.stringify()) 390747.3 Ops/sec
recursiveDeepCopy 1744221.5 Ops/sec
fastest-json-copy npm package 2540589.0 Ops/sec
jsondiffpatch.clone() 2788964.8 Ops/sec
rfdc 2649171.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • jsondiffpatch.clone()

  • rfdc