This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug rtl-optimization/31021] gfortran 20% slower than ifort on CP2K computational kernel



------- Comment #5 from jv244 at cam dot ac dot uk  2007-03-02 18:15 -------
> > 
> > grid_fast.F:483: note: not vectorized: can't determine dependence between
> > (*coef_447)[D.1967_2320] and (*coef_447)[D.1967_2320]
> >               DO icoef=1,coef_max
> >                  coef(icoef,1)=coef(icoef,1)+alpha(icoef,lx)*g1
> >                  coef(icoef,2)=coef(icoef,2)+alpha(icoef,lx)*g2
> >                  coef(icoef,3)=coef(icoef,3)+alpha(icoef,lx)*g1k
> >                  coef(icoef,4)=coef(icoef,4)+alpha(icoef,lx)*g2k
> >               ENDDO
> > 
> 
> This part, which is in the default part of the switch statement should only be
> executed in rare cases. I doubt it matters much in the overall timings. Also,
> this loop has very short trips (i.e. coef_max should, for the provided input,
> be at most 5).

I verified that the default branch is indeed not called frequently enough for
this to matter. However, by deleting all other cases (equivalent, but
specialized code), I can time that case, and find:
gfortran: 6.636415
ifort: 5.252329
which means ifort is about 26% faster for the 'case default' branch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31021


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