On Sat, 28 Apr 2001, Donn Miller wrote:
> If
> you want to make a program run faster, you've got to write implement
> better algorithms, and its as simple as that. Beyond that, you'll just
> have to get faster HW.
This in general is true, but back in the days when GCC was a good C
compiler that also had a C++ like frontend, -O2 was safe, and if you saw
bugs at -O2, 99 out of a hundred times it was an actual bug in the code
that was exposed by the optimisation (usually an uninitialised
variable).
> I think most compilers have optimization bugs,
> because you use them with the understanding that they generate
> faster/smaller code at the expense of potential side effects.
There is no excuse for generating buggy code. The compiler has to take
valid C and produce object code that faithfully implements what the
source code describes. If the compiler does not do that, it's broken.
BSD/OS for the longest time shipped with two C compilers: gcc 1.42 and
gcc 2.x, and to this date, BSD/OS ships with a patched gcc in order to
take some broken optimisations out.
Cheers,
-- Bert
--
Bert Driehuis -- [EMAIL PROTECTED] -- +31-20-3116119
If the only tool you've got is an axe, every problem looks like fun!
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message