with spread operator vs with mutation vs with object assignFastest: with mutation (21.3x faster)
7,991,277 ops/sec
1,679,302 ops/sec
374,603 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| with spread operator | |
| with mutation | |
| with object assign |
| Test name | Executions per second |
|---|---|
| ✓ with mutation | 3,071,735 Ops/sec |
| with object assign | 305,275 Ops/sec |
| with spread operator | 229,066 Ops/sec |