3 ms·
Some of the processors back then had various pre-increment vs post-decrement addressing modes so there was a performance difference which one you used. To keeps
by pkaye 9y ago
Some of the processors back then had various pre-increment vs post-decrement addressing modes so there was a performance difference which one you used. To keeps things unambiguous, use the increment operator in a statement by itself.
- sevensor 9y agoInteresting, that sheds some light on the situation! And indeed, I do always use the increment operator by itself. The amount of extra thought it takes to distinguish while(i--) from while(--i) just isn't worth it, when instead I could write for(;i>0;i--) which is very clear about what the last value of i in the loop is.