Subject: Re: Is gcc slow? Or is our gcc slow?
To: None <jules@mailbox.co.uk>
From: Niklas Hallqvist <niklas@appli.se>
List: current-users
Date: 04/05/1996 08:49:47
>>>>> "Julian" == Julian Bean <jules@mailbox.co.uk> writes:
Julian> I am fairly sure that Think C 5.0 for the Macintosh compiled
Julian> at 60K lines/minute on a IIci. And a IIci is also a 25Mhz
Julian> 68030 with an FPU. Now that wasn't optimized, and this is gcc
Julian> -O2, but I still don't think that makes up for it.
Heh, of course -O2 is slow, that's the idea of the levelling of
optimization. -O makes optimizations with a big payoff factor,
ie. cuts down much in run time for not much compile-time overhead.
-O2 is the opposite, it adds expensive optimizations which might not
add much speed at all. You're comparing apples and oranges. Now,
compile time speed has never been much of an issue for the GCC
developpers who aim to be a portable compiler with good run-time
performance. It would not be hard to write a single-hosted compiler
with a stupid codegen module if compile-time was the main concern,
however most production uses is focused on getting run-times short.
Certainly, GCC isn't necessary the best compiler there is, but it does
a better job than many others. BTW. lines/minute isn't a very good
measurement anyway, as C code varies greatly in complexity from file
to file. As it's hard to measure complexity fair, so keep that
variable constant: compile the same two files when comparing the
compilers. And of course, keeping the run-time efficiency constant
too would be wanted as well, but that is hard to accomplish. I.e. if
gcc -O0 is as fast than ACME cc -O in runtime, those are the options
to use when comparing.
Niklas
Niklas Hallqvist Phone: +46-(0)31-40 75 00 Home: +46-(0)31-41 93 95
Applitron Datasystem Fax: +46-(0)31-83 39 50 Home: +46-(0)31-41 93 96
Molndalsvagen 95 Email: niklas@appli.se GSM: +46-(0)70-714 10 35
S-412 63 GOTEBORG WWW: Here
Sweden IRC: niklas (#NetBSD)