1 |
Martin Herrman wrote: |
2 |
> On Tue, Dec 9, 2008 at 1:23 PM, Sami Näätänen <sn.ml@××××××××××××.fi> wrote: |
3 |
> |
4 |
> to /etc/portage/package.keywords. With 4.3.2 I use: |
5 |
> CFLAGS="-march=native -O2 -pipe" |
6 |
> |
7 |
> With only a small effort, you get most of the benefits. So fine-tuning |
8 |
> to the edge will give you issues to solve with only a very small |
9 |
> percentage of performance increase in return. |
10 |
> |
11 |
> My 2 cents.. |
12 |
> |
13 |
> Martin |
14 |
|
15 |
My vote goes for this one, too. In general, anything higher than -O2 |
16 |
will bring you next to nothing in best case, on averagy you'll end with |
17 |
longer code that executes about the same and in some cases, result will |
18 |
be slower. BY far most important thing, at least in general seems to be |
19 |
to nail your march right, in oreder for compiler to be able to utilize |
20 |
all that cpu has to offer. |
21 |
For my Phenom "-march=barcelona" is optimal, but then I have problems |
22 |
with "<=gcc-4.2*", which has no separate K-10 backend, so |
23 |
"-march=native" is optimal - which means that gcc checks the CPU it is |
24 |
running on and makes the best available choice. |
25 |
|
26 |
If all your gcc compilers are of version 4* upwards, then also |
27 |
"-combine" might be useful. |
28 |
|
29 |
In short, CFLAGS="-march=native -O2 -pipe -combine" is optimal for me... |
30 |
|
31 |
|
32 |
Regards, |
33 |
|
34 |
Branko |