]> git.lizzy.rs Git - rust.git/commit
collections: optimize `HashMap`. Add `DefaultResizePolicy`.
authorPiotr Czarnecki <pioczarn@gmail.com>
Mon, 2 Jun 2014 08:26:02 +0000 (10:26 +0200)
committerPiotr Czarnecki <pioczarn@gmail.com>
Wed, 4 Jun 2014 17:04:38 +0000 (19:04 +0200)
commit2202b104d4fd2b96b0e636cd3079d1c41c56bfa7
tree1950c2b57527f5fd1aaa028ce1b022b265fd282e
parenta6401b52263336c22879d4ffae3eded97949ee7b
collections: optimize `HashMap`. Add `DefaultResizePolicy`.

Refactored the load factor and the minimum capacity out of HashMap.
The size of HashMap<K, V> is now 64 bytes by default on a 64-bit platform
(or 48 bytes, that is 2 words less, with FNV)
Added a documentation in a few places to clarify the behavior.
src/libcollections/hashmap.rs