In the last episode (Sep 28), Mark Powell said:
> BTW The gcc 2.95.2 options are perfectly valid for FreeBSD as well as
> Linux. Obviously :) Can they be copied into the FBSD section too?
> 
> # these options for gcc-2.95.2 to produce fast code
> #   CC_OPTS = \
> #       -Wall -O9 -fomit-frame-pointer -march=pentium \
> #       -finline-functions -fexpensive-optimizations \
> #       -funroll-loops -funroll-all-loops -pipe -fschedule-insns2 \
> #       -fstrength-reduce \
> #       -malign-double -mfancy-math-387 -ffast-math 

I object to half of these options because whoever added obviously never
tested his additions one at a time to verify that they actually help.

1) There is no -O level above 3

2) You can't assume the user is compiling on a 586

3) Here is a list of the -f options listed, and which -O level
    automatically enables them:

        -fomit-frame-pointer         -
        -finline-functions           3
        -fexpensive-optimizations    2
        -funroll-all-loops           -
        -funroll-loops               enabled by -funroll-all-loops
        -fschedule-insns2            2
        -fstrength-reduce            2
        -ffast-math                  -

So at minimum, the CC_OPTS should read 

 -Wall -pipe -O3 -fomit-frame-pointer -funroll-all-loops -ffast-math
 -malign-double mfancy-math-387 

And it's debatable whether unroll-all-loops is a win or not (depends on
whether the unrolled code is larger than your CPU's cache).

-- 
        Dan Nelson
        [EMAIL PROTECTED]
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to