Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0
Chrome 122
Windows
Desktop
9 months ago
Test name Executions per second
lodash cloneDeep 917800.9 Ops/sec
JSON.parse(JSON.stringify()) 665600.6 Ops/sec
recursiveDeepCopy 1214258.8 Ops/sec
fastest-json-copy npm package 868311.1 Ops/sec
jsondiffpatch.clone() 3266557.5 Ops/sec
rfdc 3376631.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