This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: food for optimizer developers
On Thu, Aug 12, 2010 at 09:51:42AM +0200, Steven Bosscher wrote:
> On Thu, Aug 12, 2010 at 8:46 AM, Ralf W. Grosse-Kunstleve
> <rwgk@yahoo.com> wrote:
> > Hi Vladimir,
> >
> > Thanks for the feedback! Very interesting.
> >
> >
> >> Intel optimization compiler team (besides researchers) is much bigger than
> >>whole GCC community.
> >
> > That's a surprise to me. I have to say that the GCC community has done amazing
> > work, as you came within factor 1.4 (gfortran) and 1.6 (g++ compiling converted
> > code)
> > of ifort performance, which is close enough for our purposes, and I think those
> > of many people.
>
> Well, I think a ratio of gfortran/ifort=1.4 isn't so great, really. If
> you look at one of the popular Fortran benchmarks (Polyhedron,
> http://www.polyhedron.com/pb05-linux-f90bench_p40html), the ratio was
> less than 1.2 for gfortran 4.3 vs. ifort 11 on an Intel iCore7.
>
> Can you tell how you obtained the performance numbers you are using?
> There may be a few compiler flags you could add to reduce that ratio
> of 1.4 to something better.
>
Without knowing the compiler options, the results of any benchmark
are meaningless. For various versions of gfortran, I find the
following average of 5 executions in seconds:
# A B C D E F G H
# gfc43 9.808 9.374 9.314 9.832 9.620 9.526 9.022 9.156
# gfc44 9.806 9.440 9.222 9.810 9.414 9.320 8.980 9.152
# gfc45 9.672 9.530 9.250 9.744 9.400 9.204 8.960 8.992
# gfc4x 9.814 9.358 8.622 9.810 Note1 9.172 8.958 9.022
#
# A = -march=native -O
# B = -march=native -O2
# C = -march=native -O3
# D = -march=native -O -ffast-math
# E = -march=native -O2 -ffast-math
# F = -march=native -O -funroll-loops
# G = -march=native -O2 -funroll-loops
# H = -march=native -O3 -funroll-loops
#
# Note 1: STOP DLAMC1 failure (10)
#
# gfc43 --> 4.3.6 20100728 (prerelease)
# gfc44 --> 4.4.5 20100728 (prerelease)
# gfc45 --> 4.5.1 20100728 (prerelease)
# gfc4x --> 4.6.0 20100810 (experimental)
#
I'll note that G is my normal FFLAGS setting along with
-ftree-vectorize. Column D and E above highlights why
I consider -ffast-math to be an evil option. For this
benchmark the math is neither fast nor is it particularly
safe with gfc4x.
--
Steve