Index:
[thread]
[date]
[subject]
[author]
From: Jason Grosland <jcg3@cs.duke.edu>
To :
Date: Mon, 8 Mar 1999 22:03:56 -0500
Re: optimization
On 8 Mar 1999, Garrett Mitchener wrote:
> Note that sometimes -O2 breaks otherwise okay code because of bugs in
> GCC. Sometimes it causes the infamous "internal compiler error."
> That's why you must develop your program without it first.
The thing with optimizations is this. If it is 100% effective, and always
works, it will be part of the compiler by default (unless it causes a
significant time hit for compilation). The more bizarre and tweaked out
your code is, the more likely that optimizations could break it (in my
experience).
Even taking out the -g and -pg should speed up your program a little.
Without debugging code and profiling code, your executable will be
smaller, which means it should load more quickly... every little bit
counts.
When considering speed, though, I remember something that Professor
Astrachan used to say: Make it run, make it right, make it fast, make it
small. Do it in that order. Speed isn't going to count for anything
unless your program performs properly.
-Jason
Index:
[thread]
[date]
[subject]
[author]