On Wed, May 29, 2019 at 12:37 PM Tadeus Prastowo <tadeus.prastowo@xxxxxxxx> wrote: > > On Tue, May 28, 2019 at 10:00 PM Stefan Ring <stefanrin@xxxxxxxxx> wrote: > > > > On Mon, May 27, 2019 at 1:49 AM Tadeus Prastowo > > <tadeus.prastowo@xxxxxxxx> 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. Yes, it is very likely that the use of `make profiledbootstrap' is the main factor that boosts the compilation speed of vanilla GCC 9. I say ``very likely'' because compiling vanilla GCC 9 using `make profiledbootstrap' results in a missing Makefile error as detailed in this thread: https://gcc.gnu.org/ml/gcc-help/2019-05/msg00137.html However, forcing the PPA build not to use `profiledbootstrap' by editing the `debian/rules.defs' file results in DEB packages whose g++-9 runs slower by almost 9%. So, I hypothesize that if the vanilla GCC 9 were successful, it would also run faster by almost 15%. Thank you very much for your kind help, Stefan. -- Best regards, Tadeus