Xinok Sort Update

Max Wolter awishformore at gmail.com
Sun Oct 30 01:52:31 PDT 2011


Hey there.

Thanks for your good work.

I decided to test your xinok sort in my implementation of the A* 
algorithm; since the list of open nodes will always be partially sorted, 
it should give better performance than the phobos sort.

/Max

On 10/30/2011 12:19 AM, Xinok wrote:
> On 10/29/2011 5:53 PM, Timon Gehr wrote:
>>
>> Looks good =). Thank you. How does this implementation of your algorithm
>> compare to the the unstable sort that is currently in Phobos,
>> performance wise?
>
> I posted some benchmarks here. These benchmarks used the specialized
> code for arrays. There would likely be a larger gap when using ranges.
> https://sourceforge.net/p/xinoksort/blog/2011/10/another-update--benchmarks/
>
>
>> 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?
>
> Yes I was. What should I do/use instead?



More information about the Digitalmars-d-announce mailing list