News for hackers. Stuff that matters.
Re:Facebook's std::vector optimization by darkpore on Saturday August 30, 2014 @07:49AM (#8246199)
You can get around a lot of these issues by reserving the size needed up front, or using a custom allocator with std::vector. Not as easy, but still doable.

The reallocation issue isn't fixable this way however...

Re:Facebook's std::vector optimization by thrownaway2424 on Saturday August 30, 2014 @12:55PM (#8246889)
You can use a feedback directed optimization pass to choose the initial size.