Is writing the a statement itself multiple times better than using a loop, if the iterations are small in number (<=5)? Basically, what I want to ask is does using loops effect the execution time and memory consumed for a code? Speaking in terms of memory, it appears that while loop does not consume any extra memory, whereas for loop uses only one extra variable. And, I don't really know about the difference in execution time.
So, are there any benefits of not using loops?