Marc Collin wrote:
> Le mercredi 13 septembre 2006 15:59, Stephan Kulow a écrit :
>> Am Mittwoch, 13. September 2006 20:57 schrieb Marc Collin:
>>>
>>> -funroll-all-loops
>> Make sure you read http://funroll-loops.org/ - what exactly do you measure?
>
> time to start, time to run function.....
>
> when i created some program in C for a company i used often something similar
> to....
>
> g++ -O2 -funroll-all-loops -fomit-frame-pointer -ffast-math -march=x86-64
> -mfpmath=sse
> program_name.cpp -o program_name
>
> i get about 10% faster then the standard syntax....
I have run benchmarks which suggest -funroll-all-loops makes things up to
10% SLOWER. Read that again. SLOWER.
gcc man page says:
-funroll-all-loops
Unroll all loops, even if their number of iterations is uncertain
when the loop is entered. This usually makes programs run more
slowly. -funroll-all-loops implies the same options as -fun-
roll-loops,
It all depends on the code and the gcc version. And we do not want to go
down this road to optimization madness.
If you really want to optimize code, make sure it is using efficient
algorithms.
Regards,
Carl-Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]