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

JN 666total at wp.pl
Thu Nov 8 17:43:47 UTC 2018


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."


More information about the Digitalmars-d mailing list