[Patch, fortran] PR24518 and PR24520 - Improvements to MOD and

Tim Prince tprince@myrealbox.com
Sun Nov 13 06:10:00 GMT 2005


Paul Thomas wrote:
> Tim,
> 
>>>
>> We showed that the library version of dot_product can be speeded up 
>> significantly for length >= 8.  If the compiler implements in-lining 
>> for short length, we would have more incentive to optimize the library 
>> for longer length.
> 
> 
> How can we chose a changeover point?  That is the only open question 
> with respect to the inline dot product before I am in a position to 
> resubmit it.  I thought to pick 32, since it is where the advantage of 
> the inline with a +vs stride is less than 10% and is about zero with a 
> -ve stride.
> 
> Both inline and library execution times depend on the length, N, of the 
> vectors as A + BxN.  I guess that we need to establish a dataset of 
> values of A and B on various processors for the inline, the library and 
> your streamlined library.  We can make a choice on the basis of those 
> figures.
> 
> The inline dot product can be timed without patching gfortran by the 
> replacement
> 
>             dot_product (x, y)       ->        sum (x * y)
> 
On the first platform I tried (Cygwin on Centrino laptop), this version of
inline dot product gave me full performance at all lengths. For the
non-vectorizable case (different strides on the 2 arrays), with 
-funroll-loops,
it performed significantly better than ifort.



More information about the Fortran mailing list