https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #44 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Sven C. Dack from comment #43)
> (In reply to Markus Trippelsdorf from comment #42)
> > (In reply to Sven C. Dack from comment #40)
> > > The results are the averages (and deviations) of 5 runs with each 
> > > compiler:
> > > 
> > >                 avg           stdev          %
> > > default:    282.86s    0.56s, 0.20%    100.00% (base)
> > > profiled:   255.76s    0.72s, 0.28%    +10.60%
> > > lto:        282.80s    0.16s, 0.06%     +0.02%
> > > lto-plugin: 285.41s    0.49s, 0.17%     -0.89%
> > 
> > Can you also try profiled+lto? This should in theory get you the fastes
> > compiler.
> 
> I am already on it, but it will take a while.
> 
> I had assumed this would not work yet. I also read that with only LTO one
> would get a faster compiler.

Not in my experience. As you've found out LTO is good for reducing 
binary sizes, but it really needs PGO to make sensible decisions.

BTW if you have TCMalloc installed on your machine, appending 
"POSTSTAGE1_LDFLAGS += -l/usr/lib/libtcmalloc.so.4" to config/bootstrap-lto.mk
may give you an additional 8-10% speed boost (at least for big C++ projects,
I haven't measured kernel build times).

Reply via email to