[MLton-user] MLton performance

Matthew Fluet fluet@cs.cornell.edu
Mon, 21 Mar 2005 16:57:01 -0500 (EST)


> > I will consider editting the SML/NJ Library code available off the 
> > web-site to eliminate TimeLimit from smlnj-lib.mlb (exposing it as a 
> > separate time-limit.mlb).
> 
> In general, I think this is a good solution to this kind of problem:
> break up monolithic libraries that export lots of structures into lots
> of mlbs, each of which exposes a structure or two and directly
> expresses its dependencies on other structures by importing the
> appropriate mlbs.  This has the advantage of making dependencies
> explicit and including only the files that a program needs, without
> any modifications to mlb semantics.  I think it would be worthwhile to
> do this for the Basis and the MLton libraries too.
> 
> This approach is also much like what is done in other languages,
> e.g. Python, where one explicitly imports the modules one needs, and
> it doesn't seem too verbose in practice.

Perhaps, though I believe that in Python part of the convenience comes
from 1) specifying the import in the source file (as opposed to specifying
it in a separate mlb file) and 2) an implicit mechanism for finding source
files corresponding to imported modules.  Neither option is available in 
our setting.