I have do an extensive calculation on a big vector of integers. The vector size is not changed during the calculation. The size of the vector is frequently accessed by the c
Performance of vector::size() : is it as fast as reading a variable?
Probably not.
Does it matter
Unless the work you're doing per iteration is tiny (like one or two integer operations) the overhead will be insignificant.