Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.1.1
Mobile
2 years ago
Test name Executions per second
lodash cloneDeep 1230857.4 Ops/sec
JSON.parse(JSON.stringify()) 1087286.0 Ops/sec
recursiveDeepCopy 1471768.9 Ops/sec
fastest-json-copy npm package 852413.4 Ops/sec
jsondiffpatch.clone() 2882398.0 Ops/sec
rfdc 3587698.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • jsondiffpatch.clone()

  • rfdc