Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0
Firefox 125
Mac OS X 10.15
Desktop
9 months ago
Test name Executions per second
lodash cloneDeep 16.0 Ops/sec
JSON.parse(JSON.stringify()) 16.4 Ops/sec
recursiveDeepCopy 121.3 Ops/sec
fastest-json-copy npm package 101.5 Ops/sec
rfdc 62.8 Ops/sec
structuredClone 38.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • rfdc

  • structuredClone