[Nottingham] Compiler optimisation flags (gcc, g++)

Martin martin at ml1.co.uk
Wed Nov 5 12:31:33 GMT 2003


Simon Huggins wrote:
> Hi NLUG,
> 
> On Mon, Nov 03, 2003 at 03:12:55PM +0000, Martin wrote:
> 
>>Any pitfalls with using the following compiler optimisations for an 
>>Athlon Palomino cpu system?
> 
> 
> The usual pitfalls with optimisation I guess.  Measure it carefully
> before and after to see if you're actually gaining anything.
> 
> It's interesting to note that -O3 can do damage to some code as Debian
> Weekly News highlighted:
> http://article.gmane.org/gmane.linux.gentoo.user/50924
> http://article.gmane.org/gmane.linux.gentoo.user/50953
> and
> http://article.gmane.org/gmane.linux.gentoo.user/50973


Thanks for the pointers. Looks like O2 is fastest from those comments. 
Perhaps O3 should be considered 'experimental'?...

To be looked at further...

Further comments/experience welcome.

Cheers,
Martin


-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------




More information about the Nottingham mailing list