[MLton] self compile with -codegen bytecode

Daniel C. Wang danwang@CS.Princeton.EDU
Thu, 21 Oct 2004 11:58:00 -0400


Out of curiosity how much time does it take to build a native mlton with a 
native mlton?

Stephen Weeks wrote:
> I fixed the last known bug in the bytecode compiler today, and was
> able to run a round of self compiles with -codegen bytecode.  Here's
> the time to generate a bytecode MLton with a native MLton.
> 
>       pre codegen finished in 192.84 + 115.16 (37% GC)
>       bytecode gen finished in 23.73 + 14.77 (38% GC)
>    Compile SML finished in 216.57 + 129.93 (37% GC)
>    Compile C and Assemble finished in 27.78 + 0.00 (0% GC)
>    Link finished in 0.33 + 0.00 (0% GC)
> MLton finished in 244.99 + 130.80 (35% GC)
> 
> And here's the time to generate a bytecode MLton with a bytecode
> MLton.
> 
>       pre codegen finished in 3150.19 + 102.34 (3% GC)
>       bytecode gen finished in 625.14 + 9.56 (2% GC)
>    Compile SML finished in 3775.36 + 111.90 (3% GC)
>    Compile C and Assemble finished in 25.16 + 0.00 (0% GC)
>    Link finished in 0.26 + 0.00 (0% GC)
> MLton finished in 3803.30 + 112.86 (3% GC)
> 
> So, a bytecode-compiled MLton runs about 10X-15X slower than a
> native-compiled MLton.
>