For loop vs Array SortFastest: Array Sort (48.9x faster)
1,756,240 ops/sec
35,903 ops/sec
Fastest: Array Sort (1.5x faster)
274,695 ops/sec
178,671 ops/sec
Fastest: Array Sort (723.9x faster)
1,137,389 ops/sec
1,571 ops/sec
Fastest: Array Sort (250.7x faster)
937,759 ops/sec
3,741 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| For loop | |
| Array Sort |
| Test name | Executions per second |
|---|---|
| ✓ Array Sort | 1,321,607 Ops/sec |
| For loop | 44,110 Ops/sec |