Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
lodash cloneDeep 2139547.8 Ops/sec
JSON.parse(JSON.stringify()) 1375724.0 Ops/sec
recursiveDeepCopy 2066623.9 Ops/sec
fastest-json-copy npm package 1515707.4 Ops/sec
jsondiffpatch.clone() 5117002.0 Ops/sec
rfdc 5698315.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