Test optimized for loops.