This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Patch, fortran] Inline DOT_PRODUCT


Paolo,
> 
> > Have you tested -ftree-vectorize?
> 
> No, I haven't and I should.  I will report back tonight.
> 

It makes no difference whatsoever - should I be changing the TREEery to benefit from it? 

On a PIV 2.5GHz, under Cygwin_NT

$ /irun/bin/gfortran -O3 -ffast-math dotprod.f90;./a
DOT_PRODUCT test
   array length        time(ns)

        4                6.60
        8               10.00
       16               25.20
       32               64.60
       64              133.20
      128              268.40
      256              539.50

$ /irun/bin/gfortran -O3 -ftree-vectorize -ffast-math dotprod.f90;./a
DOT_PRODUCT test
   array length        time(ns)

        4                6.30
        8                9.90
       16               24.20
       32               64.70
       64              132.40
      128              269.00
      256              539.70

I have taken off the constraint on kind > 8 in this tree; it works fine but is a factor ~3 slower than real(4) or real(8).

Cheers

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]