On Fri, 6 Jan 2012, Ian King wrote:
On 1/5/12 8:43 PM, "Fred Cisin" <cisin at
xenosoft.com> wrote:
[snip]
BUT, even in this example, unless the compiler
does "optimization" to
compile something other than what you asked for (DWIM!) and removes the
temporary variable,
The only time modern compilers don't do optimization is when you tell them
not to, usually so you can step through the code in a debugger. One of
I will concede that "modern" compilers DEFAULT to optimization on.
(I'm not modern)
Yeah, having debugged code that tried to be
'clever' and could have been
written clearly instead, Holub and I would be on opposite sides of that
argument. It was true thirty years ago that 'cleverly' written C could be
faster (and there were tests to prove it), but there's little
justification for that position today.
That's my point.
To be fair, my chats with Holub WERE 25 - 30 years ago. So, the
environment is now different.