Another algo for faster sorting

tsbockman via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 8 01:22:48 PDT 2016


On Friday, 8 April 2016 at 07:28:38 UTC, Andrea Fontana wrote:
> Ok, but it's not a good reason to keep an inefficient sort() on 
> phobos...

Also, your response makes it sound like I was advocating for just 
keeping everything like it is now.

But, my main point was actually that counting sort is just a 
variant of bucket sort, and it would (in my opinion) make more 
sense to write a good generic bucket sort implementation. This 
would be applicable to a much wider range of use cases, and could 
still be used to speed up `sort()` for `bool`, `byte`, and 
`ubyte` if needed.


More information about the Digitalmars-d mailing list