Normally the capacity, that is, the size of the buffer, is less than the vector size. In this case adding a new element is simply a matter of assignment and changing the size value. But when the size reaches the capacity a new and larger buffer must be allocated and all the current elements copied. The copy operation takes time proportional to the size of the vector.