This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc compile-time statistics



To look into this, I timed the speed of compiling tree.c from gcc
2.95.3.  I got the following results on an x86-linux native:

                2.95.3  3.0.4   3.1
tree.c -O0 -g   0.59    0.72    0.88
tree.c -O1 -g   0.87    1.06    1.40
tree.c -O2 -g   1.37    1.71    2.23

I doubt it matters _what_ you time it with, I expect the results will
be similar (on x86).

I looked at the reason for the slowdown, and it seems likely the
reason for the slowdown between 3.0.4 and 3.1 at -O0 on x86 is more
complex RTL.  Not more insns (in fact, fewer insns), but more
complexity within each insn.  Reload is taking twice as long to handle
fewer insns, ggc_alloc is called 30% more times, and so on.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]