Fixed-Length Array Sorting
Nordlöw via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 13 15:02:19 PDT 2016
On Wednesday, 13 April 2016 at 19:58:49 UTC, Andrei Alexandrescu
wrote:
> * Cut and paste error at
> https://github.com/nordlow/phobos-next/blob/master/src/sortn.d#L90
Fixed.
> * I see some sizes are not supported, we should not have holes.
>
> * Sometimes the sort routine gets too bulky. Suggestion: also
> define networks for medianOfUpTo and medianExactly, then use
> them in a quicksort manner - first compute the median to
> segregate values in below/over the median, then make two calls
> to sortExactly!(n / 2). That way you get to sort n values with
> median of n values (smaller and simpler) and two sorts of n / 2
> values.
Added as TODOs for now.
Thanks!
More information about the Digitalmars-d
mailing list