heapsort

Stephen Weeks MLton@sourcelight.com
Thu, 14 Jun 2001 11:00:00 -0700


> Is there any requirement that the code for the shootout be SO UGLY.  I looked
> at the heapsort code, and it is horrible, using ref's all over the place for
> no good reason.  I know that the OCaml people tend to do this, and my guess
> is that everyone is just copying their code, which is tweaked for their
> compiler.

Yep.  I did a literal translation of their code for almost all of the stuff I
submitted.

> I have done a quick pass removing the refs, but no other changes.
> (The algorithm is the same: I just did local changes) and it sped things up by
> about 50% on a big example.  Can we just submit new code for MLton?

Absolutely.  Just send Doug the whole file, as I have done.