Tim Bunce wrote:
> 
> Can anyone recommend extra gcc options to squeeze the last ounce of
> performance out of code (perl and apache in this case) on Intel?
> 
> I don't mind tying the code down to one cpu type or loosing the ability
> to debug etc. We're already doing -O6 and are looking for more.
> 
> I recall Malcom Beattie (CC'd, Hi Malcolm!) experimenting in this area,
> something about not wasting a register for the frame pointer.

That particular option would be gcc -fomit-frame-pointer.

You might try -ffast-math -fexpensive-optimizations (never played with
the latter, though, and it's probably on with -O6 anyway).

If you really want to go crazy, you could try -fbranch-probabilities
(requires more than just turning it on; read the gcc man page.) I doubt
it's worth the trouble.

And you'd probably want -march=i686 (or whatever CPU you're using).

I don't know the state of pentium-specific optimizations, but does
Cygnus's Code Fusion still have a gcc with Pentium-specific
optimizations that aren't in the main tree? I just remember the numbers
saying that they'd slightly overtaken Intel's compiler, but that was a
year and a half ago.

Unrelated to the compiler, if you're throwing around significant chunks
of data, you might want to try tuning your drives. Especially if they're
IDE, since UDMA is often disabled for safety by default. I don't know
much about SCSI tuning, but whichever interface you're using, make sure
the heads are able to go around in circles really fast.

You can also play tricks with RAM disks, or solid-state hard drives like
the ones from platypustechnologies.com. But this gets too far afield.

Reply via email to