Growth factor of RawVec, hence Vec

Right now, Vec growth factor is 2. It was surprising to me why 2 was chosen (seems equally in clang) whereas MSVC, Folly, Java etc. have chosen 1.5 or bit less that golden ratio for global arbitrary (first-fit) allocator.

Any thoughts on that possibly from core team?

1 Like

https://github.com/rust-lang/rust/issues/29931

(Also, threads like this are better suited for internals than users)

After reading the discussions, I think even for this seemingly small case, much better application-system-allocator-dependent strategy would be involve some kind of machine learning modeling done at the compile time despite it seems sci-fi!