Fwd: [MLton] Re: Cross compile on ARM successful
vesa.a.j.k at gmail.com
Wed Jun 27 13:50:02 PDT 2007
Please use "Reply to all" when replying to mails sent to the MLton
list unless you *really* want to send a private message. Thanks!
---------- Forwarded message ----------
From: Vesa Karvonen <vesa.a.j.k at gmail.com>
Date: Jun 27, 2007 11:13 PM
Subject: Re: [MLton] Re: Cross compile on ARM successful
To: Ryan Newton <rrnewton at gmail.com>
Cc: Matthew Fluet <fluet at tti-c.org>
Well, these details aren't all that important, but...
On 6/27/07, Ryan Newton <rrnewton at gmail.com> wrote:
> Yeah, the whole-program compiler with which I am targeting MLton also
> spends most of its time type checking. (And in metaprogram
> evaluation.) I just thought that MLton, with its copious
> optimizations, might be otherwise.
In my experience, with non-toy programs, MLton does indeed spend more
time in the back-end than in the front-end. With toy programs the
overhead of type-checking the Basis Library dominates. Examine the
MLton output you get when you build MLton (with MLton).
> I had noted that the high constant overhead in compile time
> (compiling an empty program). I assume this is because the compiler
> needs to do significant work on the 8K line basis library?
The Basis library is closer to 35K lines. (Just checked by running:
mlton -stop f <...>/basis.mlb | xargs wc .)
> (It does not get eliminated as dead code until late in the compiler?)
MLton first parses and type-checks the entire program (including the
35K line basis library). Dead code elimination is the next phase. You
can see this by compiling with -verbose 2.
More information about the MLton