Gentoo Archives: gentoo-performance

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-performance@l.g.o
Subject: Re: [gentoo-performance] best Gcc compilzation flags
Date: Mon, 22 Nov 2004 09:24:28
In Reply to: Re: [gentoo-performance] best Gcc compilzation flags by Matthew Groote-Kirsch
On Monday 22 November 2004 08:47, Matthew Groote-Kirsch wrote:
> I settled on: > > CFLAGS="-O2 -frename-registers -ftracer -funroll-loops > -fomit-frame-pointer -pipe -march=athlon" > > Looking around on the forums a bit, it seemed like -O2 is recommended > over -O3.
Aditionally there have been times when -O2 has been shown to be faster than -O3. Similarly, the -funroll-loops might actually create slower code due to more cache misses. Modern processors are complex systems where nondeterministic parts like the cache can have a significant impact on performance. The only real way to determine what is fastest would be to run real-world (not simple loops) tests (with timing) for each option combination. Paul -- Paul de Vrieze Gentoo Developer Mail: pauldv@g.o Homepage: