Mail Archives: djgpp/2000/07/06/18:57:08
On 6 Jul 2000, The awesome and feared S. T. L. commented thusly,
> Hi. I've been trying to squeeze more optimized code out of DJGPP by playing
> with various switches. (I don't know C yet, but I hope to learn it soon!) I'm
> compiling BladeEnc, an MP3 encoder, and want to see how fast I can get it.
> (No, I don't use it to transfer music over the Internet.) By turning on
> various switches, I've found that the commandline
> GCC -s -O2 -march=i686 -fomit-frame-pointer -ffast-math -funroll-loops
> -funroll-all-loops -malign-double -fstrict-aliasing -o BLADE.EXE *.c
> seems to produce the fastest code. (I'm doing this on a Pentium III system.)
> Am I missing any blindingly obvious switches I should be trying? I've tried
> several other switches, but they all have no effect or detrimental effects.
Did you try -O3..what effect did that have, sometimes it causes the
compiler to output code that overflows the cache etc..which can make it
slower than -O2.
> I'm looking for speed, not for size.
Sometimes(often?), unroling loops,and inlining functions can be slower on
586,686 architectures due to the cache overflows etc...
Grendel
Hi, I'm a signature virus. plz set me as your signature and help me spread
:)
- Raw text -