Thomas Kirchner wrote:
* On May 23 17:45, Walter Dnes (gentoo-user@lists.gentoo.org) wrote:
  
  Currently, I use "-march=i686" for my 3 machines, a P4, a PIII, and a
PII (and a partridge in a pear treeeeeeee<g>).

"i586 is equivalent to pentium and i686 is equivalent to pentiumpro."

  Does this mean that I would get better optimization if I use "pentium2",
"pentium3" or "pentium4", as appropriate?  I am using the available flags
(-mmmx, -msse, -msse2, -mfpmath=sse, etc) as appropriate.
    

Yes - proper march settings will give you nice benefits.  Just use 
-march=pentium{2,3,4} as appropriate.  You don't need the other options, 
they're implied by march where appropriate.

And for goodness sake, don't use the ridiculous CFLAGS suggested by some 
others.  You'll have so many problems down the road you won't know what 
to do with your system.  Good ole "-O2 -march=whatever 
-fomit-frame-pointer" produces fast, stable code.  (Skip the 
frame-pointer section if you want debuggable code.)  Ricing not 
necessary; neither is pulling your hair out because of random segfaults 
from badly optimized code.

Not to mention that no devs (and few users) will help with anything if 
you use more CFLAGS.
Tom
  
Put -pipe in there too, it speeds up compiling (or so I've heard). Right now I use CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer". -O3 isn't worth it. It would give you no more than a few percent (around 2-3) faster binaries, but they would compile longer (confirmed by a friend, he recently switched to -O2) and be larger.

Reply via email to