sort
Sort the slice which starts at from (inclusive) and ends at to (exclusive).
Sorts between from (inclusive) and to (exclusive) with intro sort.
Sorts small ranges with insertion sort. Fallbacks to heap sort to avoid quadratic worst case. Selects the pivot with medians and partitions with the Bentley-McIlroy fast 3-ways algorithm (Engineering a Sort Function, Bentley-McIlroy).