There is a slight time penalty involved each time you execute
a statement containing a 'my', so including it in the loop will penalise you slightly. However, this should be tiny compared with everything else your loop is likely to be doing, and except in exceptional circumstances, the loss in code clarity and maintainability isn't worth it.
Dave.