I meant insertionsort.

On 6/28/2008 12:38 AM, André Bargull wrote:
I see. But at least we could consider to improve the merge-sort, e.g. for small instances you can use selectionsort/insertionsort (I always confuse them with each other), to avoid recursion and creation of 1-length array objects etc.


On 6/28/2008 12:20 AM, P T Withington wrote:
Be careful. Array#sort is not stable. I think we have our own sort because we want a stable sort. Also, I think Adam got the sign of the sort result backwards from the built-in, so you would have to compensate for that even if you gave up stability.

Perhaps add a comment to the code for future archaeologists.

On Jun 27, 2008, at 16:23, André Bargull <[EMAIL PROTECTED]> wrote:

How about to file as an improvement-request at Jira, so it doesn't get lost?

- André


On 5/8/2008 4:32 PM, André Bargull wrote:
Please just remove it, that's a standard merge-sort without any adjustments, so Array#sort(..) should be much faster.

I just found this method. Do we still think that a Javascript sort method is needed? How could it possibly be as fast as the built-in Array#sort method?




Reply via email to