Run details:
Mozilla/5.0 (Linux; Android 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
Chrome Mobile 108
Android
Mobile
2 years ago
Test name Executions per second
lodash cloneDeep 71210.5 Ops/sec
JSON.parse(JSON.stringify()) 42209.2 Ops/sec
recursiveDeepCopy 94116.5 Ops/sec
fastest-json-copy npm package 62079.3 Ops/sec
jsondiffpatch.clone() 232496.6 Ops/sec
rfdc 236706.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • lodash cloneDeep

  • JSON.parse(JSON.stringify())

  • recursiveDeepCopy

  • fastest-json-copy npm package

  • jsondiffpatch.clone()

  • rfdc