1 isn't really the same thing. I don't know any compiler that would turn
for (i = 0; i < length; i++)
into for (i = length; i != 0; i--)
Which is what I read 1 to be.As for why you sometimes do one over the other. I think it is true that computers branch on zero more easily than other values. That said, I'd be a little surprised to know it makes a difference that can be measured in any meaningful program.