GCC - Optimal Optimization

Kris Kennaway kris at obsecurity.org
Fri Aug 18 17:27:48 UTC 2006


On Fri, Aug 18, 2006 at 09:10:57AM -0700, Sean M. wrote:
> With GCC 3.4.4, what are the best CFLAGS to use for an AMD Duron ~1000
> MHz? By "best" I mean creating the fastest programs that exploit fully
> all of the architecture's features, without creating a "noticible"
> increase in size. To date I've been using
> CFLAGS="-O3 -march=athlon-xp -mfp-math=sse -funroll-loops -pipe
> -ffast-math"

Don't use random options (e.g. -ffast-math) unless you know what
you're doing (yes, it says "fast", but that doesn't necessarily mean
it will make your application faster).  The "best" options to use are
the default ones (you can also set CPUTYPE according to the make.conf
documentation) unless you like debugging your system when applications
suddenly do not operate correctly.

Using nonstandard options like the above might make your system feel
sexier, but it's really not a good idea to compile your whole system
that way :-)

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060818/839bed12/attachment.pgp


More information about the freebsd-questions mailing list