On Tuesday 28 October 2003 11:52 am, Chris Graves wrote: > OK, so some folks swear by "-O3" optimizations, but alot of what I've > read suggests "-O2" produces "faster" binaries. > > I have a Pentium III (coppermine) @ 900MHz with 512M RAM and 1G swap. > What CFLAGS do I want? (questionably unstable optimizations that do > produce better results are OK)
I used to use FreeBSD, which defaults to "-O -pipe -mcpu=<whatever>". I asked then why, and thay said something like "gcc produces questionable results at higher optimization". When I switched to Gentoo, i went overboard, and included everything relevant from http://gcc.gnu.org/onlinedocs/gcc-3.3.1/ gcc/. ( CFLAGS="-march=pentium3 -mfpmath=sse -msse -msse2 -mmmx -mno-3dnow -fPIC -ffast-math -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args" ) Have fun, it prolly won't hurt anything. The biggest bottleneck on intelish systems is the FSB, so the fastest thing you can apparently do is make things smaller, so that they load faster into, and fit entirely in your L2 cache. I'm also convinced that sse is faster at floating poing math than the 387, so I now use: CFLAGS="-march=pentium3 -mfpmath=sse -msse -msse2 -mmmx -mno-3dnow -fPIC -ffast-math -Os -pipe " you don't have an sse2 unit, so you'll want to not use that flag > > -chris > > > > -- > [EMAIL PROTECTED] mailing list -- Ben Calvert Senior Systems Administrator Stonehenge NetWorks -- [EMAIL PROTECTED] mailing list
