[MLton] Re: allocateRegisters.toLiveness absurdly slow

Wesley W. Terpstra wesley at terpstra.ca
Mon Sep 14 04:49:26 PDT 2009


On Sun, Sep 13, 2009 at 9:49 PM, Wesley W. Terpstra <wesley at terpstra.ca>wrote:

>  Does it have exponential complexity in the number of variables?
>

The answer to this question appears to be: YES!

I've found a point in my project where adding one element to the record
(more than) doubles the compile time. I'm using the FunctionalRecordUpdate
pattern with this record. At this point my compile times have gone up to 25
minutes on the fastest computer available to me (my laptop now takes 1.4
hours)... It had 22 elements for a compile time of 10:30 minutes then I
increased it to 23 elements (plus some code to force the element to be used)
and the compile time went up to 24:46 minutes

At least now that I know what causes the problem, I can work around it, but
it seems pretty unfortunate that MLton has an exponential time liveness
calculation. Can this be fixed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20090914/d1819a84/attachment.htm


More information about the MLton mailing list