Using the spread operator vs Using Object.assign vs use...Fastest: use... (28.6x faster)
30,207,132 ops/sec
7,152,542 ops/sec
1,055,777 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 | |
| use... |
| Test name | Executions per second |
|---|---|
| ✓ use... | 33,304,256 Ops/sec |
| Using Object.assign | 24,552,956 Ops/sec |
| Using the spread operator | 5,550,866 Ops/sec |