[MLton-user] defunctorization
Matthew Fluet
matthew.fluet at gmail.com
Tue May 25 15:05:40 PDT 2010
On Tue, May 25, 2010 at 2:50 PM, Sean McLaughlin <seanmcl at gmail.com> wrote:
> Unfortunately, this makes my theorem prover take a very long time to
> compile. One logic will compile in about 40 seconds. With all 8 logics, it
> takes over 3 minutes (2 Gh dual-core pentium, 4 GB memory). This is due to
> defunctorization, right? Is there any way to turn that off when I'm
> debugging, and turn it on again for production compilation? I tried mlton
> -expert true --help but didn't see anything. I figure the answer is no, but
> just thought I'd ask, in case you guys have any ideas for me.
Although there is no way to disable defunctorization (and, that may
well be the most significant source of code duplication that is
increasing your compile times), there are some other sources of code
duplication that you could try to disable. Polyvariance duplicates
small higher-order functions at each of their application sites; you
can disable this with "-polyvariance false". (There are other
fine-grained controls for polyvariance.) Of course, you can disable
inlining: "-drop-pass inlineLeafA", "-drop-pass inlineLeafB",
"-drop-pass inlineNonRecursive". Compiling with "-verbose 2" will
show the timing of all of the various passes. Perhaps one in
particular is taking a long time with all 8 logics, in which case you
could disable just that pass.
But, there probably isn't any way around the increased compilation time.
More information about the MLton-user
mailing list