What sorts would you want, and why would you want them? For a Listbox, a stable sort is pretty clearly the way to go, and mergesort is as far as I know the best choice for a stable comparison-exchange sort.

Charles Yeomans

On Sep 8, 2006, at 3:55 PM, Craig Hoyt wrote:

Ah, but wouldn't it be nice to have the option to use any of several sorts. A cool feature would to be able to specify the sort method using a Listbox property. Have optimized versions of several of the common sort routines built-in and an option to point to a method for a 'custom' sort.

RS should put us on the payroll :-)

Craig

Message: 6
Subject: Re: Listbox sort algorithm
From: [EMAIL PROTECTED]
Date: Fri, 8 Sep 2006 10:45:40 -0600

On Sep 08, 2006, at 16:34 UTC, Charles Yeomans wrote:

But, as you know, there is a significant difference between quicksort
and mergesort -- mergesort is stable if so implemented.  This would
be a useful property for sorting a listbox, so it would be nice if
listbox sorting were stable, and documented to be so.

Very true.  But if there is no such documentation, then I think a
feature request is in order.

Now that you mention it, my previous speculations had more to do with
Array.Sort, not Listbox.Sort.  I do vaguely imagine considerations of
stability in listbox sorting that may not apply to array sorting. Has
anyone observed instability in the listbox sort?  A single such
observation would put an end to that speculation.  (Of course, if we
can't find a case where the sort is unstable, that really doesn't prove
anything, though it would be suggestive.)


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to