The reason for this is that in certain situations a temporary variable is constructed to hold the value before incrementing, so readability must be compromised in the quest for efficiency.
Unfortunately, I try to only use postincrement in for-loops and discrete statements, such as the following example:
for(int ct=0; ct
Strangely, when using integers (which is what we're talking about), both the above snippet and its preincrement twin compile to exactly the same code without optimization.
Pre-increment is useful in certain cases, but in most, it is merely a case of premature optimisation.
Efficency does not always mean lack of readability. Readability should always be in the forefront of code design.
Edit: put the NeHe SDK into my webspace, as NeHe doesn't allow remote linking. Thanks for letting me know Ainokea!