[MLton] Shootout Revived
Stephen Weeks
MLton@mlton.org
Sun, 20 Jun 2004 23:43:29 -0700
> Not sure if everyone knows this but the Great Language Shootout is up and
> running again..
>
> http://shootout.alioth.debian.org/index.php
Yeah, I saw that. Brent (who has revived it) was nice enough to send
mail to some of the language maintainers.
> For the last few weeks the rankings were
>
> gcc mlton, smlnj, ... ocaml
>
> the ocaml hackers not to be underestimated submited some changes and now
> the rankings are
>
> gcc, ocaml, mlton, smlnj, .....
The main change was getting one of the OCaml benchmarks working. The
completely missing score was the only reason OCaml was as low as it
was.
> In particular the fibo benchmark seems a bit suboptimal. I imagine
> you could get a small speed up by doing a range test rather than
> using pattern matching, unless the mlton match compiler is being
> much smarter than I imagine.
Yeah, that speeds it up by a few percent (maybe 5%).
> Also, there's also the trick of using Word32 rather than Int to
> avoid the overflow trapping which Ocaml doesn't do anyway...
For whatever reason, that doesn't seem to help at all. In fact, in my
tests it hurts.
In any case, I don't think either of those explains why MLton is so
much slower. It is likely something with our calling convention.
Brent gave me commit access, so I checked in the range change for
fibo.mlton. If any of y'all improve any of the other benchmarks, let
me know and I'll check in the new version.