[MacRuby-devel] Ruby sort algorithm

Morgan Schweers cyberfox at gmail.com
Mon Jan 31 12:32:12 PST 2011


Greetings,

On Mon, Jan 31, 2011 at 11:00 AM, Charles Oliver Nutter <headius at headius.com
> wrote:

> FWIW, JRuby originally had a stable Array#sort, but because it was
> slower than MRI's unstable sort (and we got bug reports to that
> effect) we replaced it with an unstable hybrid sort based on
> quicksort. Shortly after we did that, someone raised an issue against
> MRI to get it to move to a stable sort :)
>
> As far as I know, MRI hasn't changed yet.
>
> - Charlie


Yeah, I read a bit about that when I was making sure my advice was
reasonable...  I personally think the best option is to have a
Enumerable#stable_sort, rather than replacing the default behavior, since
it's rarer for folks to need a stable sort, but it'd still be nice for it to
be natively implemented when they do.

I, however, don't have the forceful personality necessary to cajole
something like that through. :)

--  Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110131/a463ccb1/attachment.html>


More information about the MacRuby-devel mailing list