News for hackers. Stuff that matters.
Re:I had to give a wrong answer to get the job (2017) by nearbuy on Monday July 19, 2021 @09:26PM (#27889203)
> Then there is the fact that you basically make every insertion 3x as costly. You better have a good reason to need this given the additional complexity and caveats.

This is the exact same average cost per element, just spread out evenly. Consider that each element still gets copied to the array of twice the size once whether you use this technique or the classic amortized version. Same average performance without the hitches (although copying a larger block of memory at once would likely be a bit faster).

There are no comments on this comment yet.