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
Message-Id: 200411221024.00207.pauldv@gentoo.org
In Reply to: Re: [gentoo-performance] best Gcc compilzation flags by Matthew Groote-Kirsch
1 On Monday 22 November 2004 08:47, Matthew Groote-Kirsch wrote:
2 > I settled on:
3 >
4 > CFLAGS="-O2 -frename-registers -ftracer -funroll-loops
5 > -fomit-frame-pointer -pipe -march=athlon"
6 >
7 > Looking around on the forums a bit, it seemed like -O2 is recommended
8 > over -O3.
9
10 Aditionally there have been times when -O2 has been shown to be faster
11 than -O3. Similarly, the -funroll-loops might actually create slower code
12 due to more cache misses. Modern processors are complex systems where
13 nondeterministic parts like the cache can have a significant impact on
14 performance. The only real way to determine what is fastest would be to
15 run real-world (not simple loops) tests (with timing) for each option
16 combination.
17
18 Paul
19
20 --
21 Paul de Vrieze
22 Gentoo Developer
23 Mail: pauldv@g.o
24 Homepage: http://www.devrieze.net