Re: help with improving compile times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Montag, 15. Mai 2017 15:16:38 CEST Markus Trippelsdorf wrote:
> On 2017.05.15 at 15:07 +0200, Mason wrote:
> > On 15/05/2017 14:01, Markus Trippelsdorf wrote:
> > > Enabling Link Time Optimization may help: -flto=<some number, e.g. the
> > > number of cores you have>
> > 
> > I'm confused. Are you suggesting that requesting /more/ optimizations
> > might reduce compile+link time?
> 
> Yes. For huge compilation units (like the template heavy example above)
> -flto=<number of 'cores'> reduces compile+link time, because it causes
> the backend to run in parallel.

% time g++-6 -o loadstore -flto=4 loadstore.cpp
  72.55s user 1.97s system 205% cpu 36.182 total

% time g++-6 -o loadstore loadstore.cpp
  63.85s user 0.75s system 99% cpu 1:04.72 total

Seems like it would help in the "code - compile - test" cycles, yes. For CI 
builds it appears to make it slower in total.

Cheers,
  Matthias

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                                https://kretzfamily.de
 GSI Helmholtzzentrum für Schwerionenforschung             https://gsi.de
 SIMD easy and portable                     https://github.com/VcDevel/Vc
──────────────────────────────────────────────────────────────────────────




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux