I know there have been a number of questions asked regarding the performance boost of using a pre increment (decrement) vs post. And from what I can infer, the majority of C/C++ compilers will change
for (int i =0; i<N; i++)
{
...
}
to the following as an optimization
for (int i =0; i<N; ++i)
{
...
}
I have been doing a lot of code review lately, I find many instances where I could change i++ to ++i. The question is doing fixing just good form or in some cases it can make a difference in performance?
Meaning do the compilers I usually use: gcc and Visual C++ automatically make this optimization? Information is also welcome about other well used compiles as well.