Using the spread operator vs Using Object.assignFastest: Using the spread operator (3.7x faster)
41,392,804 ops/sec
11,129,921 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 | 7,846,090 Ops/sec |
| Using Object.assign | 6,984,701 Ops/sec |