On Wed, Jul 10, 2019 at 10:38:27PM +0100, Ken Moffat via blfs-dev wrote:
> 
> > Now I'm trying to do a Python-3.7.4 build with LTO (its configure script now
> > supports --with-lto to do a LTO build).
> 
> A quick test after one of my early builds had completed confirmed it
> (3.7.3, I think) used PGO (Profile Guided Optimization, for those not
> familiar with that TLA) and the build takes a _lot_ longer.
> 
> I build Python3 twice: once in LFS, and then fairly early in BLFS
> after I've built extra dependencies.  Was thinking about using LTO
> for the second build, but at the moment I don't use Python3 much and
> I doubt that the benefits when running things like Meson will be more
> than a few milliseconds per package.
> 

I started by looking at 2.7.16, where 'expensive optimizations' are
described as PGO and possibly LTO.  In 3.7.3 (sic, no real point
moving on in the test builds, I'll be careful :) it doesn't mention
LTO for that.  Anyway, gave that a go with -O3.  Confirmed that LTO
is NOT used unless --with-lto is supplied, so this is only adding
PGO.

Times in seconds for configure ; make -j8 ; make install
                                             2.7.16      3.7.3
                                             ------      -----
 march=native -O2 cheap hardening, no PGO   50.371s    76.844s
 march=native -O3 cheap hardening, PGO     668.128s  1810.117s

Somehow, I don't think I'll be using PGO again for the pythons.
A lot of the PGO part seems to only use one core.

ĸen
-- 
This is magic for grown-ups; it has to be hard because we know there's
no such thing as a free goblin.
   -- Pratchett, Stewart & Cohen - The Science of Discworld II
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to