Guillaume Cottenceau wrote:
> Karl Mitchell <[EMAIL PROTECTED]> writes:
>
> > It's possibly also worth noting that Athlon/Duron chips optimise best on -O1 at
> > present under gcc-2.95. I don't know why. -Karl
>
> better with -O1 than with -O2 or superior!??
Faster with -O1 than -O2 or -O3 under almost all criteria for speed. I can't
remember the source though and the figures I've got (below) aren't a good
comparison. If you replace -O1 with -O3 on test B (below) you'll see what I mean.
By the way, I would urge against using gcc -ffast-math, as it can cause actual
errors in floating point routines. I am a numerical modeller and I found for one of
my floating point iterative routines the cumulative error was a few percent in one
case. This could have been more to do with the version of egcs I was using, but I
doubt it. Admittedly this doesn't matter for all programs, but perhaps something
like 'octave' would suffer?
Cheers,
-Karl
A) CFLAGS = -s -static -Wall
B) CFLAGS = -s -static -Wall -O1
C) CFLAGS = -s -static -O3 -fomit-frame-pointer -Wall -mpentiumpro
-march=pentiumpro -fforce-addr -fforce-mem -malign-loops=2
-malign-functions=4 -malign-jumps=2 -funroll-loops
-fexpensive-optimisations -malign-double -fschedule-insns2
-mwide-multiply
Based on K6-233 Index
Mem Index Integer index FP Index
A 1.349 1.014 1.824
B 3.605 2.284 5.003
C 3.609 3.245 7.175
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-Karl Mitchell=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Dept. of Geomatic Engineering | Secretary, ISPRS WG IV/5 |
| University College London | "Extraterrestrial Mapping" |
| Gower Street, LONDON WC1E 6BT | +44 (0)20 7504-2744 |
[EMAIL PROTECTED]=-=-==-=-=-=-=-=-=-=-=-
"Science is like sex: sometimes something useful comes out, but
that is not the reason we are doing it" -- Richard Feynman