This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gfortran 4.2 with openMP: why no speedup?
Anand Patil wrote:
attribution dropped:
>> You should also check the generated assembly code (f77 -S foo.f)
>> whether C(i,j)**2 is compiled into the inline code C(i,j)*C(i,j), or
>> into call to the run-time library power function, and also whether the
>> subscript address computations are eliminated.
>
> I'll just inline it manually to be sure. I was trying to get a speedup
> from openMP in that subroutine, not necessarily optimize overall.
>
It's true that when your only objective is to get speedup from
threading, a number of normal optimizations may make your task more
difficult. I don't know of any current Fortran compilers which don't
optimize **2 (as opposed to **2.) as soon as any optimization is enabled.