(a+b)+c should be replaced by a+(b+c)

Scott Robert Ladd coyote@coyotegulch.com
Thu Mar 25 20:16:00 GMT 2004


Laurent GUERBY wrote:
> Could you try -funroll-all-loops and may be a prefetch flag? On short
>  numerical loops this usually makes lots of difference.

gfortran -o matmulg -O3 -ffast-math -march=pentium4 \
     -fprefetch-loop-arrays -funroll-all-loops -mfpmath=sse matmul.for

..does not improve matters. Perhaps this is due to the nascent nature of 
gfortran?

As it is, I'm going to stop doing on-the-spot benchmarks for this set of 
topics, having demonstrated my assertions about performance and 
accuracy. At this point, we're using anecdotal evidence to pick compiler 
options; I prefer a more scientific approach.

By Monday, my new Acovea runs (on both P4 and Opteron) will have had a 
chance to evolve optimal compiler option sets, showing us where the 
strengths and weaknesses lie.

Or so I hope!

..Scott

-- 
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing



More information about the Gcc mailing list