[MLton-user] Slow GCC

Matthew Fluet fluet at tti-c.org
Sat Dec 30 02:39:59 PST 2006


> As to generating smaller files, you can compile with -coalesce, as in:
> 
>   mlton -coalesce 2048 foo.sml
> 
> The default is 4096, and the scale is linear.  This flag affects the
> size of the generated C and asm files.  Although it doesn't always
> help -- the outliers are sometimes not any smaller.

The native backend doesn't support the -coalesce option.  However, the 
native backend effectively has a very small implicit coalesce value (it 
uses "one function per chunk" while higher coalesce values give rise to 
"multiple functions per chunk").  The native codegen does emit multiple 
chunks into the same assembly file; this behavior can be controlled by 
-native-split 10, which tends to have the effect of putting each chunk 
of assembly into its own file.  Again, it doesn't always help with the 
outliers.

With regards to the outliers -- there are usually two large assembly 
files.  One corresponds to the initialization of global values.  The 
other corresponds to the main control-flow path.  On large input 
programs, both of these can be large.





More information about the MLton-user mailing list