public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52473] New: CSHIFT slow - inline it?
@ 2012-03-03 20:00 burnus at gcc dot gnu.org
  2012-04-10 15:22 ` [Bug fortran/52473] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-03 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52473
           Summary: CSHIFT slow - inline it?
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


For the program http://www.cita.utoronto.ca/~pen/MHD/mhd.f90 GCC produces
relatively slow code:

$ gfortran -Ofast mhd.f90; time ./a.out > /dev/null
real    0m0.534s

$ pathf95 -O3 mhd.f90; time ./a.out > /dev/null
real    0m0.169s

Which is 3.2 times faster. A closer analyis shows that it is sufficient to
compile the functions advectbyzx, tvd1 and tvdb with pathf95 to gain the same
speed. If one only compiles advectbyzx and tvd1 (and the rest with gfortran)
the speed is 0m0.301s.

The performance difference seems to be due to the calls to _gfortran_cshift0_4.

Expected: CSHIFT should be inlined (at least for a scalar SHIFT) - as pathf95
and ifort do.

 * * *

13.7.43 CSHIFT (ARRAY, SHIFT [, DIM])
Description. Circular shift of an array.Description. Circular shift of an
array.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-16 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-03 20:00 [Bug fortran/52473] New: CSHIFT slow - inline it? burnus at gcc dot gnu.org
2012-04-10 15:22 ` [Bug fortran/52473] " burnus at gcc dot gnu.org
2012-04-11 12:52 ` burnus at gcc dot gnu.org
2013-06-16 12:06 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).