On Mon, Jan 01, 2001 at 04:31:42PM -0600, Jarkko Hietaniemi wrote:
> (1) Quicksort has a weak point where it goes deep into the Quadratic Land:
>     (nearly) already ordered data.  No, that is not so far-fetched a case.
>     Mergesort has no similar weakpoints: its performance is in fact
>     consistently N log N.
> 
> (2) Mergesort is stable.  Quicksort is not.

I figured it was something like this, but wanted to know if there
were any other reasons.

I recently tracked down a bug in some software that we've been using for
years that turned out to be an implicit assumption that perl's sort
would be stable when, of course, it's not.  Had perl 5.7 come along
sooner I might never have caught the bug or been bitten by it  :-)

thanks again,

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to