Mail Archives: pgcc/1998/07/13/14:13:33
>I am trying to compile some number-crunching stuff on my Linux
>(PentiumII). I have both gcc-2.7.2.1 and pgcc-1.0.3.
>The point is that pgcc produces consistently WORSE code than gcc-2.7.2.1
>on both floating point and integer issues.
1. Pentium II has Pentium Pro core, different than Pentium. Pgcc is pentium
oriented.
2. Egcs and pgcc have the -mcpu=pentiumpro and -march=pentiumpro switches.
Did you use them?
>In all cases it produces code that is approx. 5% to 25% slower on the PentiumII.
>I have read the entire pgcc documentation, so I believe I use all the appropriate
>flags.
Try pgcc -malign-double -mstack-align-double -mcpu=pentiumpro -march=pentiumpro
-ffast-math -O2 your_program.c
Did you try these options? Data aligning can be critical. I got 250%
improvements on Pentium Pro (not with all programs, of course - this is the
extremal case).
Why -O2 only? I have found that higher optimization levels
don't improve the code on Pentium Pro.
Krzysztof
- Raw text -