Jean-Michel Dault wrote:
> 
> Here are the flags to optimize for i686:
> 
> optflags: i686 -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pipe -s
> -mpentiumpro -mcpu=pentiumpro -march=pentiumpro -ffast-math
> -fexpensive-optimizations -malign-loops=2 -malign-jumps=2
> -malign-functions=2 -mpreferred-stack-boundary=2
---
        I ran the AIM9 benchmarks -- overall, those flags gave about
a 1% performance improvement.  The problem is that for some of the
tests, they perform *worse* with the -mpentium (or -pentiumpro) switch.  
For the test I used a rebuilt kernel, rebuilt test suite and the stock math
lib either from SuSE (unopt) or from MDK (pent-opt).  Compiler for both
was egcs from 7.0MDK.

        The most aggregious offender was short integer addition -- the
-mpentium switch cause a 25% slowdown!!!  I've sent the code/test
case and exact switches used to the pentium compiler group (pgcc).
I haven't had a chance to dump assembler and find out why.  The benchmark
was performed on a 2x500-PIII SMP machine running a stock 2.2.14 kernel,
256M, 10K-RPM SCSI's.

        There were several of the tests that performed worse in the
5-7% range, but even with all those slowdowns, overall for the 60 tests
was a 1% increase in speed.  If I turned off the pentium optimizations 
for the test suite itself and ran it, I got close to a 2% speedup (~1.7%).

        I'm hoping to get a fix out of the compiler group in a reasonable
timeframe since since if the short-int problem is fixed, that might
cause speed-ups throughout the test.

Reply via email to