structuredClone() vs spread syntax vs Object.assign()Fastest: spread syntax (58.4x faster)
36,839,392 ops/sec
5,563,589 ops/sec
630,599 ops/sec
Fastest: Object.assign() (34.1x faster)
13,236,055 ops/sec
4,056,080 ops/sec
387,943 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| structuredClone() | |
| spread syntax | |
| Object.assign() |
| Test name | Executions per second |
|---|---|
| ✓ spread syntax | 24,585,106 Ops/sec |
| Object.assign() | 2,232,440 Ops/sec |
| structuredClone() | 164,035 Ops/sec |