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

Paul Thomas paulthomas2@wanadoo.fr
Sat Nov 12 15:46:00 GMT 2005


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)

Best regards

Paul



More information about the Fortran mailing list