structuredClone() vs spread syntax vs Object.assign vs Object.fromEntries vs JSON vs Cursed ProxyFastest: spread syntax (39.6x faster)
18,776,872 ops/sec
15,443,028 ops/sec
3,525,583 ops/sec
990,473 ops/sec
739,834 ops/sec
474,611 ops/sec
Fastest: Object.assign (37.3x faster)
15,310,604 ops/sec
4,461,170 ops/sec
4,413,742 ops/sec
937,202 ops/sec
697,768 ops/sec
410,367 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 | |
| Object.fromEntries | |
| JSON | |
| Cursed Proxy |
| Test name | Executions per second |
|---|---|
| ✓ Cursed Proxy | 30,848,864 Ops/sec |
| spread syntax | 28,524,344 Ops/sec |
| Object.assign | 3,570,910 Ops/sec |
| JSON | 1,073,940 Ops/sec |
| Object.fromEntries | 649,583 Ops/sec |
| structuredClone() | 229,965 Ops/sec |