std.algorithm.sort slower than C++'s std::sort for integer arrays

Andrea Fontana nospam at example.com
Fri Nov 9 07:57:57 UTC 2018


On Thursday, 8 November 2018 at 17:43:47 UTC, JN wrote:
> On Thursday, 8 November 2018 at 15:28:25 UTC, Andrea Fontana 
> wrote:
>> I've already said in the past that we probably can improve 
>> sort() function tuning it for some cases (f.e. short int or 
>> bytes...). Many languages use some hybrid algorithms like 
>> timsort & similar. I don't know what D do on phobos...
>>
>> Did you consider this?
>>
>> Andrea
>
> https://dlang.org/phobos/std_algorithm_sorting.html#sort
>
> "Algorithms
> Introsort is used for unstable sorting and Timsort is used for 
> stable sorting."

Right, what about the others language tested?


More information about the Digitalmars-d mailing list