array.sort - What algorithm is being used here?

Daniel Harper djharperuk at gmail.com
Sun Sep 16 15:29:10 PDT 2012


On Sunday, 16 September 2012 at 20:52:03 UTC, jerro wrote:
> 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.

Thanks for the prompt reply.

Perhaps the documentation can be updated to reflect this?


More information about the Digitalmars-d mailing list