This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] Inline DOT_PRODUCT
Whilst I have regtested and all is well, the main purpose of this patch
is to speed up execution of dot_product for small arrays. To this end,
I attach a test program that is not part of the patch but produces the
results below, on a quiet Athlon1700. It may be seen that, with -O3,
the patch removes the function call overhead of ~25-30ns, which is
highly significant for arrays of sizes below approximately 32. The
error on the timing is a few ns and there is a residual overhead, which
must(?) be the dot_product loop overhead, which is about 15ns. The
performance, with the patch, is identical to that of ifort.
Have you tested -ftree-vectorize?
Paolo