Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Mac OS X 10.15.7
Desktop
4 months ago
Test name Executions per second
JSON.stringify 1465515.9 Ops/sec
structuredClone 789100.9 Ops/sec
deepCopyObject 1327544.1 Ops/sec
deepCopyObjectSimple 3476447.8 Ops/sec
deepCopyObjectIterative 3560061.2 Ops/sec
copy 1320249.1 Ops/sec
clone 1245458.5 Ops/sec
copyv2 1523427.1 Ops/sec
JSON.stringify - huge 23.4 Ops/sec
structuredClone - huge 15.8 Ops/sec
deepCopyObject - huge 10.7 Ops/sec
deepCopyObjectSimple - huge 20.5 Ops/sec
deepCopyObjectIterative - huge 21.8 Ops/sec
copy - huge 13.0 Ops/sec
clone - huge 16.7 Ops/sec
copyv2 - huge 13.0 Ops/sec
Script Preparation code:
Tests:
  • JSON.stringify

  • structuredClone

  • deepCopyObject

  • deepCopyObjectSimple

  • deepCopyObjectIterative

  • copy

  • clone

  • copyv2

  • JSON.stringify - huge

  • structuredClone - huge

  • deepCopyObject - huge

  • deepCopyObjectSimple - huge

  • deepCopyObjectIterative - huge

  • copy - huge

  • clone - huge

  • copyv2 - huge


;