[MLton-user] Re: RFC: Extended Basis Library

Scott Cruzen sic at lerp.com
Tue Mar 6 12:38:22 PST 2007


* Vesa Karvonen <vesa.a.j.k at gmail.com> [070306 08:39]:
> On 3/4/07, Scott Cruzen <sic at lerp.com> wrote:
> >> for the sorting function that is as fast as possible while being stable
> >> (O(n log n) and preserves relative order of equal elements).
> [...]
> >This is a fast stable qsort
> >http://lerp.com/~sic/sml/qsort.sml.html
> 
> Hmm...  Fast it may be, but are you sure that it is stable?  The first
> section of the article

Oops, sorry about that.

I use it in a program that sorts mostly sorted data and add a line number
to ensure stability. I remembered that I needed a stable sort for this
application, but I didn't remember the details.

I haven't compared against intro sort, but for my data this qsort
does well.



More information about the MLton-user mailing list