[MLton] unused variables in MLton

Stephen Weeks MLton@mlton.org
Thu, 19 Feb 2004 15:16:19 -0800


> One interesting point Rico brought up when I was showing him the
> current experimental version: on my ancient machine (a 400 MHz CPU),
> MLton grinds for 9.70 CPU seconds before it even opens the files
> provided in command line arguments.  This must be reading in the
> basis library and the like.

Yeah.  It costs about 3 seconds on my 1.6GHz machine, and compiling
hello world takes about 5.

> In the old days this wasn't too bad of a problem because one did not
> use MLton to develop code, but now it is a bit of a pain.  It seems
> to me that this is a strong argument for putting back the save-world
> after the basis library has been read in.

True enough.  The plan was to not build this into MLton or into the
binary packages and instead to provide a more general facility,
-{load,save}-basis, so that the user could do this for the basis
library or for his own libraries.  I'll think about squeezing this
feature in for the release.  Since I really don't want to include the
saved world in the binary packages, the only other fix that I see
would be a temporary hack where MLton creates the saved world the
first time it is called on some machine, and stashes it somewhere for
future calls.