On 05/20/2010 09:17 PM, Vladimir Makarov wrote:
Steven Bosscher wrote:
For some time now, I've wanted to see where compile time goes in a typical GCC build, because nobody really seems to know what the compiler spends its time on. The impressions that get published about gcc usually indicate that there is at least a feeling that GCC is not getting faster, and that parts of the compiler are unreasonably slow.
It is just a feeling. In fact, starting since 4.2, gcc becomes faster (if we ignore LTO). My feeling is that LLVM becomes slower. The gap in compilation speed between GCC4.5 and LLVM2.7 achieves less 10% on x86_64 SPECInt2000 for -O2. Feeling that GCC becomes slower probably occurs for people who switched recently from 3.x versions because in comparison with theses versions gcc became slower achieving maximum slowdown 25 and 40% slowdown on gcc4.2 correspondingly on SPECInt2000 and SPECFP2000 on x86_64 for -O2.
I never understood the problem of "gcc getting slower", but that might just be my "the economic life-time of computers is 3 years" replacement policy.
It's very interesting, Vladimir, to couple this to switching from gcc 3 to gcc 4.
Because I was mainly interested in what gcc 4 (+ gfortran) could *do* (in terms of the code it could compile), I never really bothered about the compiler's speed of doing so.
What I *did* notice, though, is that as of gcc 4.4, I can recompile our complete weather forecasting code (~ 1 million lines of Fortran and ~ 30,000 lines of C) with -O3 -ffast-math (therefore, with vectorization) within 5 minutes [quad core Core 2].
This means that recompiling "everything" before every run (4 times a day) is now a no-brainer (currently, I do it only once a day, max).
-- Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran