No.
As mentioned, you should determine your end condition before you use in it a loop, meaning that you should have
int total = height*width;
for( int i=0; i < total; ++i ) {
// ...
}
so that total isn't constantly computed during the loop. That said, everyone does it and I would expect the compiler to optimize your version into this version anyway.
The real issue, as I see it, is that in the loop you may have to reverse the computation from the total
, meaning that you might have to have
int total = height*width;
for( int i=0; i < total; ++i ) {
int x = total / width;
int y = total % height;
call(x,y);
}
This would be slower than
for( int i=0; i < width; ++i ) {
for( int j=0; i < height; ++i ) {
call(i,j);
}
}
which should be faster. This does not take into consideration "branching operations" in CPU's. See Branchless Programming: Why "If" is Sloowww... and what we can do about it!.
EDIT: And yes, the most salient comment in this thread is that you should worry about readability much more performance.