strength reduction and other optimizations
Bill McEnaney
bill@rkirkpat.net
Sat Jul 15 01:29:00 GMT 2006
Good advice, Ian. Thanks. I'm fanatical about readability and
efficiency. But I normally don't micro-optimize when micro-optimiations
would decrease my code's readability.
Ian Lance Taylor wrote:
Unless your code is performance critical, you should write whatever
code will be easier for people to read and understand. In the
relatively rare case that the code is performance critical, then you
should certainly do whatever generates the faster assembly code, and
revisit the issue whenever you run the program on a new computer.
gcc is able to both optimizations you mention, and it will do them,
when optimizing, when it is beneficial.
________________________________________________________________
"Pro-choice?" Then click here.
http://cathinsight.com/morality/saying.htm
"Men must look for the peace of Christ in the Kingdom of Christ... When
once men recognize, both in private and in public life, that Christ is
King, society will at last receive the great blessings of real liberty,
well-ordered discipline, peace and harmony." Pope Pius XI
More information about the Gcc-help
mailing list