Karl Mitchell <[EMAIL PROTECTED]> writes:


[...]

> > 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?

I don't know precisely why this has been chosen. I think this is because,
this is default parameters, and packagers are supposed to override them
when needed.


[...]

> 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

I don't understand.

You did not explain the numbers:

I suppose than B is faster than A because there is no optim for A. So
given this, I interpret your numbers are "speed index" (opposed to "time
consumed"), e.g. the greater the faster.

So, For all three things, C is faster than B.

Why do you say -O1 is faster than -O2, then? Is it something to do with
the other parameters? (so why did you put other parameters for C..!?)



-- 
Guillaume Cottenceau -- Distribution Developer for MandrakeSoft
http://www.mandrakesoft.com/~gc/

Reply via email to