I wouldnt be too confident from just using a few simple examples
Remeber that the compiler can optimize and make all the difference in simple cases, but if your task becomes complex and more involved, then that optimisation might not be applied....
Interestingly......I tried FYB's code on VC++6 & Codewarrior 5...
For VC++6 debug, they were roughly the same with local winning by a little bit,
For Codewarrior debug, the local took about the same as the local in VC++, but the global was optimised to a count of 0.
For both compilers, when put into default release mode, they both optimised both to zero.....