bwtRadixSortDeep

private fnvoid bwtRadixSortDeep(uint[] indices, const(ubyte)[] block, uint lo, uint hi, int depth, uint[] temp) pure nothrow

Deeper radix sort for large buckets with repetitive data. Uses single-byte radix at each level with efficient batch skipping.

Optimizations:

  • Reuses temp buffer instead of allocating per depth level
  • Batch skips uniform byte sequences by sampling first
  • Uses ternary radix quicksort for medium buckets (faster than counting sort)
  • Uses iteration instead of recursion when all bytes are identical
  • Falls back to introsort for small buckets

Parameters

indicesArray of indices to sort.
blockThe data block that indices refer to.
loStart of the range to sort (inclusive).
hiEnd of the range to sort (exclusive).
depthCurrent byte depth for comparison.
tempReusable temporary buffer (must be at least n elements).