Sort¶
Adaptive sorting algorithms for integer arrays.
Module: Std::Sort
Import¶
Description¶
The Std::Sort module provides four comparison-based sorting algorithms for integer arrays:
| Function | Algorithm | Strategy |
|---|---|---|
Sort |
Auto | Dispatches quadsort (≤128) or crumsort (>128) |
Quadsort |
Quadsort | Branchless quad-swap + merge network |
Piposort |
Piposort | Pipelined odd-even merge sort |
Crumsort |
Crumsort | Adaptive quicksort with median-of-three pivot |
Each algorithm is available with both int and uint64 element types (e.g. Quadsort, QuadsortUint64).
Credit¶
These sorting algorithm implementations are based on the work of scandum.