Using the spread operator vs Using Object.assignFastest: Using the spread operator (17.8x faster)
14,034,405 ops/sec
789,629 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Using the spread operator | |
| Using Object.assign |
| Test name | Executions per second |
|---|---|
| ✓ Using the spread operator | 18,359,720 Ops/sec |
| Using Object.assign | 1,176,159 Ops/sec |