This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Compilation performance of GCC 3.4.2 and GCC 4.0.0 (041021) ontramp3d-v3
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 25 Oct 2004 15:00:21 +0200 (CEST)
- Subject: Compilation performance of GCC 3.4.2 and GCC 4.0.0 (041021) ontramp3d-v3
Just to have another datapoint besides Karels observations. I'm
using the tramp3d-v3.cpp testcase in place for testing POOMA
application performance. The testcase can be fetched from
http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/tramp3d-v3.cpp.gz
detailled logs (including time-report) can be provided on demand.
Testing is done by
g++-3.4 -S tramp3d-v3.cpp -Dleafify=fooblah -ftime-report ...
Note that both compilers are built with checking disabled,
and 3.4.2 is profilebootstrapped, for 4.0.0 profilebootstrap doesnt work.
... 3.4.2 4.0.0 Delta%
-O0 24.18s 19.90s 21.5
-O1 83.75s
-O1 -funit-at-a-time 50.70s 66.38s -24
-O2 65.88s 88.18s -25
-O2 -funroll-loops 69.73s 93.12s -25
These figures may be distorted because (again) code metrics for
inlining changed between 3.4.2 and 4.0.0 (and we're using unit-at-a-time
for 4.0.0 always), so with leafifying included we get the following
numbers:
... 3.4.2 4.0.0 Delta%
-O1 -funit-at-a-time 70.26s 117.08s -40
-O2 92.77s 150.35s -38
-O2 -funroll-loops 97.71s 153.48s -36
-O2 -fno-exceptions 67.90s 110.28s -38
So while 4.0.0 really shines on -O0, it looses on optimization, typically
about 20%. Especially with large and a huge number of BBs as resulting
from inlining (or heavy inlining caused from leafifying) where we loose
up to 40% speed!
Note how exceptions cause a huge slow-down (~30%) in compilation time.
Even created code is worse than 3.4.2 (for ia32) - but that's another
story.
Oh yes, measurements were done on a Pentium-4 with 2GB of ram.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/