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]

Re: [GCC 3.0] Bad regression, binary size


On Mon, 9 Jul 2001, Neil Booth wrote:

> Gerald Pfeifer wrote:-
>
> > Indeed, GCC 3.0 takes an order of magnitude longer to compile my sources,
>
> That's not fair - it's not compiling the same sources if you're
> talking about C++ with the standard library, which I presume you are.

I dunno about the 1minute+ helloworld compile time someone just suggested,
but this is disturbing:
(v2.95) g++ -o hello hello.cc  0.15s user 0.03s system 96% cpu 0.186 total
(v3.0)  g++ -o hello hello.cc  2.04s user 0.06s system 99% cpu 2.102 total

if there's a 2 second loading overhead for g++v3, that's 2 seconds * (#
files) which can be quite a lot in large trees.  Is this simply from
linking in the new libstdc++?

c performance is still fine afaict

openssl 0.9.6a (probably not the best choice in the world, but it'll do):

v3.0 (733)
(O3, m486)       make  183.20s user 10.17s system 98% cpu 3:16:49 total
(O2, march=i686) make  177.66s user 10.44s system 99% cpu 3:08.32 total
(-O -march=i686) make  144.05s user 9.64s  system 99% cpu 2:33:84 total

vs v2.95 (850) (but slower hdd)
(O3, m486)       make  130.88s user 15.06s system 90% cpu 2:41.03 total
(O2, march=i686) make  128.23s user 15.73s system 92% cpu 2:36.26 total
(-O -march=i686) make  128.82s user 15.17s system 92% cpu 2:35.58 total

A better rebuttal for c compilation might be that gcc 3.0 is slower with
significant optimization, but 2.95 doesn't seem to be doing much more
optimizing in -O2 vs -O.  Keep in mind the CPU speed difference.

If you're compiling so much, perhaps the better model would be to use -O
or -O0 until you need a release-speed build to do stress testing with, at
which point it makes sense to spend longer compiling for incrementally
smaller code speed increases.  It may not have made very much difference
in 2.95, but it makes sense that it _should_, given a compiler that
actually does significantly more processing for higher optimization
levels.


justin


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