Re: stable sorting
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Feb 25, 2003
- 453 views
On Tue, 25 Feb 2003 17:02:05 +0100, Juergen Luethje <eu.lue at gmx.de> wrote: >> I think it would be valuable to mention, whether or not the sorting >> of sort() is stable, along with a short explanation for beginners, >> what that means. Personally, I would never trust a stable sort. Instead, if needed, (fwiw, I always go with multi-key sort) I would suggest adding an incrementing integer in place of the rest of the key. If that does not help (performance, at a guess, ask yourself why you are bothering with the original sort / re-sort subsets as they come out / find a better way to solve the problem (eg store the data in a database with an index you can just read down in the first place, or munge/hash all sort keys into minimum bytes possible) Pete PS I see you're infected with Habeas
I like the concept, not the total shrouding of useful (and yet useless to spammers) information about the poster that may be useful to help others help the poster.