I have written the code now and run a benchmark. In the benchmark function
slices.Sort is 9% faster than slices.SortFunc, which is ca. 9% faster than
slices.SortStableFunc for my benchmark. I don't need stable sort, but
assumed that merge sorting would benefit more from presorted runs.
On Sunda
It has not been added because it is pointless. Stable sorting is generally
slower than regular sorting, as it puts extra constraints on the output and
keeping to those makes things slower. And for a total order, *every*
sorting algorithm produces a stable sort, as stability only matters if you
have
I have a use case where I have to sort int32 slices repeatedly that are
already partially sorted. (Imagine a tree of smaller non-overlapping
segments of the same slice, where sorting starts at the bottom and moves to
the top and the results of the individual sorts are required for the
algorith