#multi #hashmap #vector #backend #performance #space #number #higher #key #sizes

halfbrown

Multi backend HashMap for higher performance on different key space sizes

11 releases

✓ Uses Rust 2018 edition

new 0.1.10 Oct 15, 2019
0.1.9 Oct 13, 2019
0.1.6 Jul 29, 2019
0.1.3 May 25, 2019
0.1.2 Apr 19, 2019
Download history 77/week @ 2019-07-02 81/week @ 2019-07-09 122/week @ 2019-07-16 150/week @ 2019-07-23 192/week @ 2019-07-30 213/week @ 2019-08-06 365/week @ 2019-08-13 223/week @ 2019-08-20 178/week @ 2019-08-27 265/week @ 2019-09-03 197/week @ 2019-09-10 338/week @ 2019-09-17 178/week @ 2019-09-24 1218/week @ 2019-10-01 677/week @ 2019-10-08

1,456 downloads per month
Used in 1 crate

Apache-2.0/MIT

115KB
2K SLoC

Halfbrown HashMap   Build Status Windows Build Status Latest Version

Hashmap implementation that dynamically switches from a vector based backend to a hashbrown based backend as the number of keys grows


Note: The heavy lifting in this is done in hashbrown, and the docs and API are copied from them.

Halfbrown, is a hashmap implementation that uses two backends to optimize for different cernairos:

VecMap

For less then 32 key value pairs it uses a dumb vector based map implementation. This trades the need to iterator through the vector for not having to hash strings on lookup or inserts.

Hashbrown

For more then 32 elements it upgrades the map to aq hashbrown base map to account for longer itteration times.

License

halfbrown itself is licensed under either of

at your option.

Code / docs copied from hashbrown are obviously licensed under their License.

Dependencies

~375KB