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