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 5.2 Ops/sec
JSON.parse(JSON.stringify()) 14.9 Ops/sec
recursiveDeepCopy 73.3 Ops/sec
fastest-json-copy npm package 55.3 Ops/sec
rfdc 42.8 Ops/sec
structuredClone 33.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • rfdc

  • structuredClone