|
|
Darren New wrote:
> (assuming you're copying elements from the old array
> to the new array each time, of course).
They do seem to actually address exactly this assumption with respect to
their resizing scheme:
"This makes sense because modern operating systems don't copy the entire
data when reallocating a buffer; the physical memory pages are simply
reordered, and only the data on the first and last pages actually needs
to be copied"
In fact, they explicitly address this difference with respect to QVector:
"Since the cost of reallocating is higher in that case, QVector<T>
reduces the number of reallocations by always doubling the memory when
running out of space."
Post a reply to this message
|
|