This is the mail archive of the
mailing list for the GCC project.
gcc compile-time statistics
- From: Geoff Keating <geoffk at geoffk dot org>
- To: gcc at gcc dot gnu dot org
- Date: 18 May 2002 19:06:13 -0700
- Subject: 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 <firstname.lastname@example.org> <email@example.com>