Spread and reverse vs Slice and reverse vs For loopFastest: Slice and reverse (3.5x faster)
860,963 ops/sec
843,867 ops/sec
244,802 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Spread and reverse | |
| Slice and reverse | |
| For loop |
| Test name | Executions per second |
|---|---|
| ✓ Slice and reverse | 345,516 Ops/sec |
| For loop | 237,712 Ops/sec |
| Spread and reverse | 113,888 Ops/sec |