News for hackers. Stuff that matters.
Re:C++ Core Coroutines Proposal [pdf] by dbaupp on Friday September 21, 2018 @08:21AM (#18039142)
O(n^2) time for n push_back calls would be worse, so some sort of multiplication/exponential growth is required for the "fits all" default vector and its default growth strategy.
Re:C++ Core Coroutines Proposal [pdf] by BeeOnRope on Friday September 21, 2018 @12:23PM (#18040783)
Old versions of MSVC used a 3/2 growth factor which led to less extreme jumps for large vectors, although also a lot more copies when filling a small vector. I'm not sure if that's still true.