There used to be a huge difference between:
p= blabal ; p ++ ;
and
blabla[x ++]
Back in the dark ages, the difference in runtime for a screen grabbing loop was:
arrays 170 seconds
pointers 10 seconds
Now adays, there's so much [] use out there the compiler
writers made it much more competative. (And once in a
while the [] is faster if you're too clever with pointers.)
When in doubt however, benchmark it.
In the dark dark ages, it was even faster to count down in a for loop than it was to count up and compare. You might once in a while see an old:
for (i= 100; (i --); ) ...
which saved a few instructions on a 68030 vs
for (i= 0; (i < 100); i ++) ...
Don't do it anymore though. VC produces worse code for the count down than it does for the count up. Actually, the horrifying thing is that the un-optimized count down is the fastest; but the optimized count down is slower than either version of the count up. Somebody in the optimization group really had their head in a blender.