Jan 22, 2009 at 12:04am
The difference was just 1 ASM instruction. Post-Increment would do a copy then increment, pre-increment wouldn't do the copy.
Nowadays, it likely doesn't matter as the compiler would prob just generate the most efficient code.
Jan 22, 2009 at 1:41am
Though it can be more overhead if "i" is not of a "simple" type such as int.
Always use pre-increment unless you truly need the value of "i" before it
is incremented.
Jan 22, 2009 at 1:12pm
Typically, post increment (i++) requires a temporary, whereas pre increment doesn't.