[MLton] self compile with -codegen bytecode

Stephen Weeks MLton@mlton.org
Wed, 20 Oct 2004 23:09:02 -0700


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.