This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
RE: [Patch, fortran] Inline DOT_PRODUCT
- From: "THOMAS Paul Richard 169137" <paul dot richard dot thomas at cea dot fr>
- To: <paolo dot bonzini at lu dot unisi dot ch>
- Cc: <fortran at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Feb 2006 12:27:12 +0100
- Subject: 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