regular sort vs toSorted vs spread and sort vs just spreadFastest: just spread (13.4x faster)
5,336 ops/sec
482 ops/sec
451 ops/sec
397 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| regular sort | |
| toSorted | |
| spread and sort | |
| just spread |
| Test name | Executions per second |
|---|---|
| ✓ just spread | 182,689 Ops/sec |
| toSorted | 1,637 Ops/sec |
| regular sort | 1,488 Ops/sec |
| spread and sort | 1,473 Ops/sec |