bwtSort
private fn
void bwtSort(uint[] indices, const(ubyte)[] block) pure nothrowSort an array of rotation indices based on the rotations they represent.
This uses a two-phase approach for better performance:
- Radix sort on the first 2 bytes (65536 buckets) - O(n)
- Introsort within each bucket - O(k log k) per bucket
This dramatically reduces comparisons since most buckets are small.
Parameters
indices | Array of indices to sort in place. |
block | The data block that indices refer to. |