Test case name | Result |
---|---|
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 |
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 |