structuredClone(myObject) vs JSON.parse(JSON.stringify(myObject))| Test case name | Result |
|---|---|
| structuredClone(myObject) | |
| JSON.parse(JSON.stringify(myObject)) |
| Test name | Executions per second |
|---|---|
| ✓ JSON.parse(JSON.stringify(myObject)) | 45,902 Ops/sec |
| structuredClone(myObject) | 33,920 Ops/sec |