Using the spread operator with constant inside vs Using Object.assign to merge two objects vs Using the spread operator to merge two objects vs Using the spread operator with two extra variables vs Composing objects into new one | Test case name | Result |
|---|---|
| Using the spread operator with constant inside | |
| Using Object.assign to merge two objects | |
| Using the spread operator to merge two objects | |
| Using the spread operator with two extra variables | |
| Composing objects into new one |
| Test name | Executions per second |
|---|---|
| ✓ Composing objects into new one | 139,970,288 Ops/sec |
| Using the spread operator with constant inside | 63,406,088 Ops/sec |
| Using the spread operator with two extra variables | 58,530,804 Ops/sec |
| Using the spread operator to merge two objects | 19,185,654 Ops/sec |
| Using Object.assign to merge two objects | 8,271,973 Ops/sec |