Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Thread beginning with comment 477156
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: GCC isn't all that great
by Alfman on Tue 14th Jun 2011 09:36
in reply to "RE[5]: GCC isn't all that great"
vodoomoth,
"Are you saying that GCC should have turned the code you wrote into the code by @acobar? Or that it should
magically guess the intentions in some code section?"
Not exactly, no.
It should have recognized that it would achieve the exact same logic semantics had it precomputed the number of iterations up front instead of testing array bounds on each iteration. This is a fairly common optimization for many use cases.




Member since:
2010-03-30
Are you saying that GCC should have turned the code you wrote into the code by @acobar? Or that it should
magically guess the intentions in some code section?
I don't see a compiler failing to do that qualify as a "deficiency".