Re: strength reduction and other optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux