mozilla/rust — pull request #14526 by pczarn (2014-05-29 21:01:47+00:00)
Title: Optimized `HashMap` for size. Added `ResizePolicy`

An interface that gives a better control over the load factor and the minimum capacity for HashMap.
The size of `HashMap` is now 64 bytes by default on a 64-bit platform (or at least 40 bytes, that is 3 words less, with FNV and without minimum capacity)

Unanswered questions about `ResizePolicy`

* should it control the `INITIAL_CAPACITY`?
* should it fully control the resizing behavior? Even though the capacity always changes by a factor of 2.
* is caching `grow_at` desirable?