From: Michel Demazure Date: 2010-11-19T17:25:44+09:00 Subject: Re: sort_by is not stable ? Charles Nutter wrote in post #962516: > In any case, it wasn't an arbitrary decision. We debate almost > endlessly over these sorts of things, and I think I've taken a good > ten years off my life due to the related stress :) > 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. Am I wrong ? _md -- Posted via http://www.ruby-forum.com/.