From: Charles Oliver Nutter Date: 2010-12-05T10:08:16+09:00 Subject: Re: sort_by is not stable ? On Fri, Nov 19, 2010 at 2:25 AM, Michel Demazure wrote: > Just to come back to my initial post : it was not about sort, but about > sort_by. > > For sort_by, you need to compute the keys, and sort the indices > according to the keys. It is not in-place sorting. Yes, optimal in-place > quicksort is unstable. But for sort_by, one could use a stable version. We don't distinguish between the two in JRuby, but it might be a good trade-off to say that sort_by is stable and sort does not necessarily have that guarantee. - Charlie