Vanilla GCC 9 slower than Ubuntu GCC 9

Tadeus Prastowo tadeus.prastowo@unitn.it
Wed May 29 10:37:00 GMT 2019


On Tue, May 28, 2019 at 10:00 PM Stefan Ring <stefanrin@gmail.com> wrote:
>
> On Mon, May 27, 2019 at 1:49 AM Tadeus Prastowo
> <tadeus.prastowo@unitn.it> wrote:
> > Once debuild is done, I installed the aforementioned DEB files and
> > found out that the installed /usr/bin/g++-9 still compiles faster as
> > before.  So, I have failed to identify the factor in the PPA build
> > process that makes the resulting compiler faster than mine, which was
> > built from the release tarball using configure & make.  Any idea how
> > to find the factor that results in a faster compiler?  Is it really
> > the build process or the way the resulting compiler is installed that
> > gives the speed up?  For example, does symbol stripping have any
> > effect (I tried already to strip all symbols out of the executables
> > found in my GCC-9 installation with `strip -s' but to no avail)?
> > Perhaps some compiler libraries are installed in a particular way in
> > Ubuntu?
>
> I guess the Ubuntu package uses "make profiledbootstrap", which you
> don’t get (IIRC) when just issuing "make".

Yes, that is true, but that did not ring my bell.  Thank you very much
for ringing the bell for me, quoting
https://gcc.gnu.org/install/build.html:
It is possible to use profile feedback to optimize the compiler
itself. This should result in a faster compiler binary. Experiments
done on x86 using gcc 3.3 showed approximately 7 percent speedup on
compiling C programs. To bootstrap the compiler with profile feedback,
use make profiledbootstrap.

I will give it a try and report it back.

-- 
Best regards,
Tadeus



More information about the Gcc-help mailing list