Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Mac OS X 10.15.7
Desktop
4 months ago
Test name Executions per second
JSON.stringify 1367890.4 Ops/sec
structuredClone 732135.6 Ops/sec
deepCopyObject 1229286.2 Ops/sec
deepCopyObjectSimple 3254397.2 Ops/sec
deepCopyObjectIterative 3357120.0 Ops/sec
copy 1286921.0 Ops/sec
clone 1329905.6 Ops/sec
copyv2 1544201.6 Ops/sec
JSON.stringify - huge 22.0 Ops/sec
structuredClone - huge 15.8 Ops/sec
deepCopyObject - huge 10.9 Ops/sec
deepCopyObjectSimple - huge 21.9 Ops/sec
deepCopyObjectIterative - huge 22.9 Ops/sec
copy - huge 13.1 Ops/sec
clone - huge 16.5 Ops/sec
copyv2 - huge 13.2 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


;