In most programs, loop performance isn't much of an issue, unless some expensive operation (such as a database query) is inside the loop, and the loop is called many, many times. If everything inside the loop is just done in memory, & doesn't use outside resources, you'll probably be OK.

Of course, there are exceptions to every rule. If you're doing weather modeling or nuclear explosion simulations, then CPU performance can be an issue. But these are advanced applications, & you're obviously at the beginner level. So for now, don't worry about loop performance unless you have proof that that it's causing a problem.

But it only exists in your head: it's that notion that you need to have the very tightest possible code instead of plain easily readable source and let the optimizing compiler take it from there. The compiler may not even use your structure that you are trying to optimize, so what's the point?

Once you have your project, then see if there are any bottlenecks, but in reality, you will be hard pressed to find any significant code changes for opimizaton if you just write good, clean, readable, logically correct code.