Please grow your buffers exponentially

If you record every heap allocation and re-allocation done by Firefox you find some interesting things. In particular, you find some sub-optimal buffer growth strategies that cause a lot of heap churn. Think about a data structure that involves a contiguous, growable buffer, such as a string or a vector. If you append to it … Continue reading Please grow your buffers exponentially