On 23/03/2011 14:11, Warren Young wrote:
> If you are wrong and your vector implementation's growth
> strategy is the common 2x one, you have only one
> reallocation and copy unless you are wrong by a factor of 2
> * (1 + fudge_factor). If the fudge factor is 10%, that means
> you have to underestimate the number of returned records by
> more than 220% to get two or more reallocations and copies.
This notion of "common" is still up for debate.
MSVS uses 1.5x; GCC uses 2x. I'd say that's about half and
half, until people seriously start using comeau, clang or
ICC in production.