Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Identifying Rust's collect:<Vec<_>>() memory leak footgun. Parent comment
No matter what the growth factor, you want to set the capacity up front if you know it. But 2x and 1.25x are both reasonable.
There are no comments on this comment yet.
No matter what the growth factor, you want to set the capacity up front if you know it. But 2x and 1.25x are both reasonable.