I want to use vector as a buffer. The interface is perfect for my needs, but there\'s a performance penalty when resizing it beyond its current size
vector
Encapsulate it.
Initialise it to the maximum size (not reserve).
Keep a reference to the iterator representing the end of the real size, as you put it.
Use begin and real end, instead of end, for your algorithms.
begin
real end
end