[MLton] -mtune=opteron considered harmful

Matthew Fluet fluet at tti-c.org
Mon Aug 13 16:33:07 PDT 2007


On Mon, 13 Aug 2007, Matthew Fluet wrote:
> On Tue, 14 Aug 2007, Florian Weimer wrote:
>>  On Debian unstable at least, the C parts of MLton are compiled with
>>  -mtune=opteron.  With recent GCCs (4.1 in some distros, and 4.2
>>  mainline), this overrides the default of -mtune=generic, and produces
>>  code that doesn't run very well on Netburst machines.  (The impact on
>>  the Core architecture should be less significant, if measurable at
>>  all.)
>
> Fair enough; I'm not sure it was doing anything particularly useful.

By which, I mean that (by default) it is only used when compiling the 
runtime.  (It would also be used when compiling the programs with the 
C-codegen, but GCC 4.1.2 and 4.2.1 have bugs that cause gcc ICEs with the 
C-codegen code.)  So, the differences in tuning are mainly affecting the 
garbage collector.  I wouldn't expect the difference to be measurable on 
any machine, except for programs that are spending a significant portion 
of their time in the garbage collector.

Do you have a program/machine pair that is measurably faster without 
-mtune=opteron, or is this just an anecdotal recommendation?



More information about the MLton mailing list