Created attachment 640354 [details] pyperformance comparison, py37 with pgo enabled I spend a lot of my time developing and running python codes. Now that gcc10 is unmasked, with its improved lto and pgo options, I decided to see if enabling those are worth it. The answer is "yes, definitely" for me. The attachment shows the result of a pyperformance run, with the only differences being "--enable-optimizations" and "--with-lto" added to the ebuild. Enabling pgo causes sandbox errors, so I had to disable that with FEATURES. I set CFLAGS="-O3 -pipe -march=native -flto -fno-semantic-interposition" on my Intel Core-i7 6700K CPU. Compilation time was 40 minutes, about a factor of 3 slower. Speedups as reported by pyperformance range from 1.07 to 1.37, with a median-by-eyeball at around 1.13. The benchmarks closest to what I do most are around 17%. 17% may not sound like much, but for as much as I'm waiting for codes to run, this is something like getting a week of my life back every year. There is considerable overlap in this request with Bug 700012 but (in my hands, at least) the speedup from LTO is minor compared with PGO. I request "pgo" and "lto" USE flags be added to the python ebuilds that turn on "--enable-optimizations" and "--with-lto". Some work will need to be done on the build system to avoid the sandbox violations.
See the other bug (bug 615412) for PGO discussion.
Please close in favor of bug 61541. I submitted patches there.
Fixed as part of bug 700012.