Using the spread operator vs Using Object.assign vs swc vs Manualy vs json vs set vs keysFastest: Manualy (3.1x faster)
816 ops/sec
765 ops/sec
582 ops/sec
581 ops/sec
262 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 | |
| swc | |
| Manualy | |
| json | |
| set | |
| keys |
| Test name | Executions per second |
|---|---|
| ✓ keys | 3,532 Ops/sec |
| set | 2,097 Ops/sec |
| Manualy | 1,423 Ops/sec |
| swc | 1,325 Ops/sec |
| Using the spread operator | 973 Ops/sec |
| Using Object.assign | 953 Ops/sec |
| json | 491 Ops/sec |