On 10/29/2011 07:13 PM, Xinok wrote:
I recently put some time into updating my implementation of xinok sort
for D. Major changes include support for random-access ranges and custom
predicates ("a>b"). You can download the new version here:

http://sourceforge.net/projects/xinoksort/files/D%202.0/2011-10-29/xinoksort.d/download


For those that are unaware, I posted about a new sorting algorithm a few
weeks ago. Xinok sort is a *stable* sorting algorithm with good
performance while only requiring a small amount of constant additional
memory.

The current stable sort in Phobos is broken and much slower, so I hope
to contribute my algorithm to Phobos. But I'm new to this, so I'm not
really sure of all what I need to do. I would appreciate if a few people
could review my code and suggest any changes or improvements, as well as
test for bugs.

Looks good =). Thank you. How does this implementation of your algorithm compare to the the unstable sort that is currently in Phobos, performance wise?

One comment:

while(temp is null){
        try temp.length = len;
        catch(Exception err){ // Reduce memory usage and try again
                len /= 2;
                if(len >= 8) continue;
                else throw err;
        }
}

temp.length = len cannot throw an Exception.
I think you are trying to catch an OutOfMemoryError here?

Reply via email to