Crate small_map

Crate small_map 

Source
Expand description

A small inline SIMD-accelerated hashmap designed for small amounts of data.

SmallMap stores data inline when the number of elements is small (up to N), and automatically spills to the heap when it grows beyond that threshold.

§Examples

use small_map::SmallMap;

let mut map: SmallMap<8, &str, i32> = SmallMap::new();
map.insert("a", 1);
map.insert("b", 2);

assert_eq!(map.get(&"a"), Some(&1));
assert!(map.contains_key(&"b"));
assert!(map.is_inline()); // Still stored inline

Structs§

IntoKeys
A consuming iterator over the keys of a SmallMap.
IntoValues
A consuming iterator over the values of a SmallMap.
Keys
An iterator over the keys of a SmallMap.
Values
An iterator over the values of a SmallMap.

Enums§

IntoIter
Iter
SmallMap

Traits§

Equivalent
Key equivalence trait.

Type Aliases§

ASmallMap
FxSmallMap