On Saturday, 21 June 2014 at 01:48:20 UTC, Peter Alexander wrote:
On Saturday, 21 June 2014 at 01:07:20 UTC, safety0ff wrote:
std.algorithm.sort with SwapStrategy.unstable is considerably
slower than his, whereas builtin sort is abysmal.
I find that generally using SwapStrategy.stable performs
better.
This isn't universal though as there are cases where it is
slower.
wat
Shouldn't unstable be faster, otherwise we might as well just
alias unstable = stable!?
Many times my data is the result of mapping sorted/partially
sorted input to a function which does not randomize order.
This creates many partially sorted runs.
Timsort is used for stable sorting and it was designed for this
type of input.