Faster sort?

Andrea Fontana via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 7 01:33:40 PDT 2016


On Thursday, 7 April 2016 at 08:23:09 UTC, John Colvin wrote:
> But it definitely can eliminate an unused result. My 
> prediction: you took an array and sorted it, then did nothing 
> with the result, so it rightly concluded that there was no 
> point doing the sort. In any given case the compiler could be 
> removing some or all of the work.

But it should remove result if I replace boolSort() with sort() 
too, instead it take 10 seconds to run.






More information about the Digitalmars-d mailing list