[MLton-user] MLton installation on Mac OS X

Brian P. O'Hanlon brianpo@cmu.edu
Mon, 8 May 2006 22:56:03 -0400


> Another question, though:  I put the text
>
>   print "Hello, world!\n";
>
> in the file foo.sml, and then ran
>
> $ time mlton foo.sml
>
> real    0m15.079s
> user    0m11.469s
> sys     0m2.188s
>
> Should I be surprised at how long it took?  I'm running Mac OS X
> 10.4.6 on a PowerBook G4.

Nope.  The optimizations that mlton makes as it compiles typically
take a long time to perform, as it does the "whole-program
optimization" thing and compiles to a few intermediate languages
before hitting machine code, so that is about what you should expect
from its compilation.  Fortunately, this means that the compiled
program should run pretty quickly (though for a "hello world" program,
there may be a bit of a slow down relative to say, c, but that is
negligible).  Have fun!
-Brian