why does array appending add a page size instead of doubling ?
Ali Çehreli
acehreli at yahoo.com
Sun Feb 3 07:26:46 PST 2013
On 02/03/2013 02:32 AM, timotheecour wrote:
> I'm curious whether you have a reference explaining why
> 3/2 works better than 2x (as in std::vector) in resizing?
I had heard about this years ago first on comp.lang.c++.moderated. I am
pretty sure it is common practice in modern libraries.
This may be the thread:
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.c++.moderated/asH_VojWKJw/discussion[1-25-false]
Scott Meyers refers to an older thread there. So it may have been that
one. But it doesn't matter, there are articles online now. :)
Ali
More information about the Digitalmars-d-learn
mailing list