Expand description
Customized HashMap and Hasher implementation optimized for using ObjectIds as keys.
The crate mirrors std::collections in layout for familiarity.
§Examples
use gix_hash::{Kind, ObjectId};
let id = ObjectId::empty_blob(Kind::Sha1);
let mut map = gix_hashtable::HashMap::default();
map.insert(id, "empty blob");
assert_eq!(map.get(&id), Some(&"empty blob"));
let shared = gix_hashtable::sync::ObjectIdMap::default();
assert_eq!(shared.insert(id, 1), None);
assert_eq!(shared.insert(id, 2), Some(1));Modules§
- hash
- hash_
map - A hash map implemented with quadratic probing and SIMD lookup.
- hash_
set - A hash set implemented as a
HashMapwhere the value is(). - hash_
table - A hash table implemented with quadratic probing and SIMD lookup.
- sync
- thread-safe types
Traits§
- Equivalent
- Key equivalence trait.