Using the spread operator vs Using Object.assignFastest: Using the spread operator (1.9x faster)
54,464,856 ops/sec
28,938,968 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 | 78,138,048 Ops/sec |
| Using Object.assign | 37,642,652 Ops/sec |