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

Jon Degenhardt jond at noreply.com
Fri Nov 9 01:27:36 UTC 2018


On Friday, 9 November 2018 at 00:31:32 UTC, Jon Degenhardt wrote:
> On Thursday, 8 November 2018 at 14:36:45 UTC, Atila Neves wrote:
>> This I was not expecting:
>>
>> https://www.reddit.com/r/programming/comments/9v8ouc/an_overview_of_sorting_algorithms_and_a_pretty/e9ajt1o/
>
> Using LTO on only D could result in a comparison inequity. 
> However, it is legitimate for comparing std.algorithm.sort to 
> manual.d.

I gave LTO a try for this (Mac OS). It did not change anything. 
Timings I saw were consistent with Atila's report, with and 
without LTO.



More information about the Digitalmars-d mailing list