[MLton-user] Explosion in MLton compilation time

Matthew Fluet fluet at tti-c.org
Tue Jun 23 07:16:48 PDT 2009


On Mon, 22 Jun 2009, David Hansel wrote:
> Matthew Fluet wrote:
>> On Thu, 18 Jun 2009, Dan DuVarney wrote:
>>> One question I have is: Are there any compile-time constants which might
>>> prevent the compile-time increase? We are already dropping the
>>> deepFlatten pass.
>>
>> Obviously, you can '-drop-pass simplifyTypes -drop-pass refFlatten' to
>> omit the offending passes.
>
> What kind of consequences should we expect from using those flags?  Are
> those passes an important part of the optimizations MLton does to the code
> or are the improvements usually rather minor?

See http://mlton.org/SimplifyTypes and http://mlton.org/RefFlatten for 
descriptions of the optimizations.

The simplifyTypes optimization is ancient --- it appears in the oldest 
copy of the MLton sources I have (Jan. 2001).  I don't know of any 
benchmarks results that measure the impact of simplifyTypes, but it could 
be significant, since the type simplification would improve the precision 
for later optimizations.

The refFlatten optimization can have measurable effects:
   http://mlton.org/pipermail/mlton/2004-July/025572.html
   http://mlton.org/pipermail/mlton/2004-July/025653.html

Obviously, the effectiveness of any optimzation depends on the program in 
question: your mileage may vary.




More information about the MLton-user mailing list