[MLton] Scaling issue during refFlatten when building the type dependencies graph

Vesa Karvonen vesa.a.j.k at gmail.com
Tue Sep 9 20:29:16 PDT 2008


On Tue, Sep 9, 2008 at 5:12 AM, Matthew Fluet <fluet at tti-c.org> wrote:
> On Mon, 8 Sep 2008, Nicolas Bertolotti wrote:
[...change to ref-flatten...]
>> This change drastically reduced the memory usage (from millions of edges
>> to one thousand edges) and solved the problem.
>
> Wow!  That is quite a difference (and suggests a large number of
> datatype/variants in the input program).
[...]

This also seems to reduce space requirements when compiling mlkit with
mlton.  Without this change, compiling mlkit with ref-flatten takes a
lot of memory (8GB is not enough on a 64-bit machine).  With this
change it is possible to compile mlkit with ref-flatten (max live was
about 2.5GB (IIRC)), but it takes a very long time, about 11 hours
(IIRC), almost all of it in ref-flatten, on a C2Q machine clocked at
2GHz.  (The numbers 2.5GB and 11 hours are approximate as someone
managed to close the console window when I left the machine for 2
minutes.)

-Vesa Karvonen



More information about the MLton mailing list