This is the mail archive of the 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]

Re: gcc 3.1 is still very slow, compared to 2.95.3

> Compiling the OpenBSD  kernel:
> gcc 2.95.3 yields:
> make  229.16s user 20.34s system 89% cpu 4:38.64 total
> gcc 3.1 yields:
> make CC=egcc  398.28s user 22.55s system 91% cpu 7:40.39 total
> This is not quite twice as slow, but very close.
> I would have expected things to somehow come back to normal after
> the somewhat disastrous 3.0.x results.
> It's not even clear the new compiler does a much better job. After all,
> gcc itself is slower, isn't it ?
> Same set of optimizations, mostly -O2.
> This is a major show-stopper for us. Basically, it means that we can't
> use gcc 3.1 without effectively killing, oh, about half the arches we
> are supposed to support: m68k, vax, m88k, sparc, at least.
> For instance, this means that a 68040 machine will jump from 3 days to
> 5 days for a complete make build... A sun3 will go from ten days to
> eighteen...
> And that's for make build. On a machine which does a make build in 1 hour
> takes... 18 hours to build the rest of the packages in our system.
> Scale that to m68k and friends.
> Okay, now, what passes is gcc 3.1 running that slow it down that much ?
> What would be the equivalent set of options to gcc's 2.95.3 -O2, so that
> I can see whether we can get down to more reasonable numbers ?

I am sorry to say that according to the profiles, there is no single
place in GCC where we burn most of the CPU cycles.  The slowdown is commulative
result of many patches and it is clear that compile time performance has not
been thread seriously during GCC development (3.0 had number of other problems
that were addressed).  I personaly will care more the compile time performance
in next development and hope we will set up some periodic tester to check this
(this has proved to be effective at runtime perfomrance, where 3.1 is very well of).

I would suggest using of -O1 for machines where is not enought CPU power to
compile in resonable times.  -O1 codes does not perform at all that bad
(Andreas Jaeger has measured 3% overall difference in performance at using 3.0.x compiler, currently the difference will
be probably bigger, but still acceptable) and compilation is considerably
faster.  It can be interesting to compare -O1 performance to -O2 performance
of gcc 2.95.  Since 3.1 is about 6% faster for SPECS, there is good chance that
-O1 3.1 code perofrms better than -O2 2.95 code.


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