The int
and unsigned int
variables take exactly the same amount of memory and represented in the resulting assembly code in exactly the same way. Thus adding unsigned
here changes nothing from the performance point of view.
In general you should not worry. The loop counter is definitely not the biggest memory consuming thing in your program.
1
solved Loop – what is the safest variable to use as the index