Sorting an array
Jarrett Billingsley
kb3ctd2 at yahoo.com
Mon Feb 5 16:03:57 PST 2007
"Michiel" <nomail at hotmail.com> wrote in message
news:eq8bim$2gou$1 at digitaldaemon.com...
> When I use array.sort, which sorting algorithm does D use? Can the
> programmer
> overwrite the implementation of this function?
>
> Thanks!
DMD at least uses quicksort. You can find the actual source for it in
/dmd/src/phobos/internal/qsort2.d. You can see that it just calls the C
stdlib qsort() function.
If you want to use a different algorithm, you'd have to change this file and
recompile phobos. A daunting task..
More information about the Digitalmars-d
mailing list