compiled programs significantly slower after upgrading

Jack Stalnaker
Wed Apr 18 21:55:00 GMT 2018

Yeah, I realize it's a difficult question with no example. It would be
quite difficult to chop out a chunk of the code showing the 5x slowdown,
though, I think. I was probing for something big or obvious I may have
missed, or some known issue with the later versions, since this is so
dramatic, and since the only thing that has changed is the compiler. The
compilation options are minimal. I'm using -g -Og, and that's it. I have
tried a release build with some finer tuning, but that doesn't show much

On Wed, Apr 18, 2018 at 4:50 PM, Jeff Law <> wrote:

> On 04/18/2018 03:45 PM, Dennis Clarke wrote:
> > On 18/04/18 05:28 PM, Jack Stalnaker wrote:
> >> I upgraded gcc from 4.8.2 to 7.3.0. I also upgraded binutils to 2.30
> >> (from
> >> the default installed on scientific linux 5).
> >>
> >> Unfortunately, the executable I get is now 5 times slower consistently.
> I
> >> have changed nothing about the code itself. I have not changed any
> >> compilation options either. I'm honestly shocked by such a dramatic
> >> slowdown. Has something changed significantly between these two
> versions?
> >>
> >> I realize I haven't given any information about the code itself (it's
> >> a mix
> >> of fortran and c), but the important thing is the significant slowdown
> >> when
> >> only the compilation chain has changed.
> >>
> >> Can anyone give me any insight as to what might be happening or how to
> >> address it?
> >>
> >
> > With no code at all to consider ?  Not likely.   Take a look at your
> > optimization options and your settings for "march/mtune" etc in case
> > you had those.  Look at the actual online manual for 7.3.0 and check
> > your options as a LOT has changed and a lot deprecated.
> Given a 5x slowdown, it's not likely arch/tuning options.  But without
> code there's really nothing we can do -- even reasonable speculation is
> impossible.
> jeff

More information about the Gcc-help mailing list