bwtSort

private fnvoid bwtSort(uint[] indices, const(ubyte)[] block) pure nothrow

Sort an array of rotation indices based on the rotations they represent.

This uses a two-phase approach for better performance:

  1. Radix sort on the first 2 bytes (65536 buckets) - O(n)
  2. Introsort within each bucket - O(k log k) per bucket

This dramatically reduces comparisons since most buckets are small.

Parameters

indicesArray of indices to sort in place.
blockThe data block that indices refer to.