[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    GCC 3.1 - even slower compilation and relocation
From:       Rolf Magnus <ramagnus () t-online ! de>
Date:       2002-05-17 15:40:26
[Download RAW message or body]

Hi,
First of all: if you aren't interested in some comparisons between gcc 2.95.3 
and gcc 3.1, just stop here. This is not about the speed of the generated 
executables (it's about app startup time though)

I did some testing of the newly released GCC 3.1. I was using some CVS 
versions before and found some speed penalties in compilation, relocation and 
a massive increase in size of debugging binaries.

Now I got the new gcc 3.1 to try out if it has become better in the release. 
First, I did a complete build (not only symlinks src tools) of the current 
qt-copy, once with gcc 2.95.3 and once with gcc 3.1 (CPU is Athlon XP at 
1.533Ghz).


Compile time:
=============
(configure options for qt were -qt-gif -system-zlib -qt-imgfmt-mng 
-system-libpng -qt-imgfmt-jpeg -system-libjpeg -no-g++-exceptions -thread 
-no-xinerama -xft -debug)

output of "time make" with gcc 2.95.3:

real    34m56.576s
user    33m16.010s
sys     1m12.750s

and with gcc 3.1:

real    69m10.886s
user    65m58.620s
sys     1m49.540s

So compilation with gcc 3.1 takes twice! as much time as with 2.95.3. Someone 
mentioned that I should have compiled gcc 3.1 with --disable-checking to 
reduce some runtime checking overhead, but it didn't give much improvement:

real    66m59.415s
user    63m15.600s
sys     1m45.950s

Relocation times:
=================
This is the result of "LD_DEBUG=statistics designer"

gcc 2.95.3:

19610:  runtime linker statistics:
19610:    total startup time in dynamic loader: 99450870 clock cycles
19610:              time needed for relocation: 96252974 clock cycles (96.7%)
19610:                   number of relocations: 11570
19610:        number of relocations from cache: 19609
19610:             time needed to load objects: 2912251 clock cycles (2.9%)

gcc 3.1:

19605:  runtime linker statistics:
19605:    total startup time in dynamic loader: 155168071 clock cycles
19605:              time needed for relocation: 150826130 clock cycles (97.2%)
19605:                   number of relocations: 13878
19605:        number of relocations from cache: 21553
19605:             time needed to load objects: 4010301 clock cycles (2.5%)

So the relocation time goes up by a factor of about 1.5 with gcc 3.1. Those 
are the results of a qt linked with the new binutils 2.12 -z combreloc option 
that speeds up relocations. I have some older results with gcc HEAD of 
2002-03-21, where the -z combreloc results were about the same. Just in case 
you are interested in the effect that -z combreloc has on the relocation 
time, those are the results without it:

gcc 2.95.3:

07188:
07188:  runtime linker statistics:
07188:    total startup time in dynamic loader: 144293736 clock cycles
07188:              time needed for relocation: 124828263 clock cycles (86.5%)
07188:                   number of relocations: 18640
07188:        number of relocations from cache: 19802
07188:             time needed to load objects: 5526436 clock cycles (3.8%)

gcc HEAD as of 2002-03-21:

10263:
10263:  runtime linker statistics:
10263:    total startup time in dynamic loader: 208165944 clock cycles
10263:              time needed for relocation: 204587996 clock cycles (98.2%)
10263:                   number of relocations: 40241
10263:        number of relocations from cache: 2434
10263:             time needed to load objects: 3252161 clock cycles (1.5%)

Debug builds:
=============

Debug binaries don't grow as much as with the CVS version I tested, but still 
they get twice as big with 3.1 (with the CVS version, it was a factor of 3):

debugging version of qt compiled with 2.95.3:
-rwxr-xr-x    1 root     root          28M May 17 11:27 libqt-mt.so.3.0.4

and with 3.1:
-rwxr-xr-x    1 root     root          54M May 17 01:05 libqt-mt.so.3.0.4

Non-debug builds seem to be comparable in size though.

Conlcusion: gcc 3.1 is slow, even much slower than 2.95.3 :(, and app startup 
times will go up again. And if you have a small disk, forget about debug 
builds with gcc 3.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic