Dan Nelson wrote:
>
> 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.
Oh well... Better give some *facts*:
- these options /had/ been tested, one at a time
(which took quite a while, btw.)
- some experimental versions of gcc do contain optimization
levels above 3 (2.95.2 does not, but it does not hurt)
- there is no such thing as a "best optimization for all CPUs".
Let alone all systems.
Let alone for every version of lame.
Above flags might have been the optimum only for my system
(a BX DUAL PIII-450 with CL3-memory) AND some particular
version of lame. Even the linux kernel (+patches) can play
quite a role. (SSE-optimized memcpy in 2.2.16 gives about
50% higher throughput in memory-IO-bound applications)
Your mileage WILL vary.
There should be different optimization flags for different
systems, containing simple comments ("use this for a P1-MMX
system" etc.). Feel free to provide some. TEST THEM.
Frank
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )