[MLton] ref flattening enabled

Stephen Weeks MLton@mlton.org
Fri, 23 Jul 2004 15:59:17 -0700


I worked out the remaining kinks with ref flattening, and it is now
enabled by default.  Here are some stats for a self compile.

MLton compiled with ref flattening, compiling itself.

      pre codegen finished in 171.01 + 84.32 (33% GC)
      x86 code gen finished in 179.69 + 113.34 (39% GC)
   Compile SML finished in 350.79 + 197.66 (36% GC)
MLton finished in 380.25 + 198.45 (34% GC)
total allocated: 31,182,885,360 bytes

MLton compiled without ref flattening, compiling itself.

      pre codegen finished in 174.42 + 102.14 (37% GC)
      x86 code gen finished in 191.35 + 122.13 (39% GC)
   Compile SML finished in 365.87 + 224.27 (38% GC)
MLton finished in 395.62 + 224.97 (36% GC)
total allocated: 32,161,277,200 bytes

So, ref flatening cut total allocation by about 3%, and cut the
"Compile SML" time by about 8%.  Not too bad.

One oddity is that the executable compiled with ref flattening is
9,980,206 bytes, while it is only 8,752,477 without ref flattening.


If you want to see how ref flattening works on your code, compile both
with and without "-drop-pass refFlatten".  Please report any
significant speedups or slowdowns.