What makes a difference in the resulting compiler's speed when building gcc?
Markus Trippelsdorf
markus@trippelsdorf.de
Thu Oct 27 16:22:00 GMT 2016
On 2016.10.27 at 16:53 +0100, Sven C. Dack wrote:
> Hello,
>
> I've been installing private copies of gcc for a while now, but only
> recently did I notice that my distro's gcc (Debian testing) is doing much
> better when comparing compile times than any of my copies. For instance does
> it take 230s for my copy to compile a linux kernel, but only 163s for my
> distro's gcc, which is almost a minute in difference for something that
> doesn't take more than 3-4 minutes to compile.
>
> What makes this noteworthy for me is that I've compiled my copy with
> profiledbootstrap and LTO enabled and also optimized it for my CPU, whereas
> the distro's compiler won't have been optimized quite that much, but yet is
> it so much faster in speed. I don't know how exactly my distro's gcc has
> been set up, because the Debian build rules are rather complex and include
> their own set of patches. So I thought I start with asking here first.
>
> What is that can make such a huge difference in compile speed for two copies
> of gcc, both version 6.2, using the same options, on the same source? Or are
> any of the configure options know to have a huge impact on the resulting
> compiler's speed?
Interesting. But without knowing the exact configuration and build
options it is hard to tell what is going on.
It is known however that a PGO/LTO bootstrapped compiler is slower that
a pure PGO bootstrapped one on X86. However the difference is much lower
that what you observe (low single digit percentage, not your measured 30%).
--
Markus
More information about the Gcc-help
mailing list