array.sort - What algorithm is being used here?

jerro a at a.com
Sun Sep 16 13:52:53 PDT 2012


On Sunday, 16 September 2012 at 20:29:50 UTC, Daniel Harper wrote:
> It's not clear in the documentation 
> (http://dlang.org/arrays.html) what sorting algorithm is being 
> used behind the array.sort implementation.
>
> Can anyone shed any light? I.e. is it quicksort?

It is. The source is here 
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/qsort.d 
. You should probably be using std.algorithm.sort, though.


More information about the Digitalmars-d mailing list