flatmap
Fast and efficient linear map and set for small collections.
Features
FlatMap<K, V>- Dynamic linear map with O(n) operationsFlatSet<K>- Dynamic linear set with O(n) operationsConstantFlatMap<K, V, N>- Fixed-size map with compile-time capacityConstantFlatSet<K, N>- Fixed-size set with compile-time capacity
Usage
use ;
// Dynamic map
let mut map = new;
map.insert;
assert_eq!;
// Dynamic set
let mut set = new;
set.insert;
assert!;
// Fixed-size map
let const_map = from;
assert_eq!;
// Fixed-size set
let const_set = unsafe ;
assert!;
Performance
Optimized for small collections where linear search is faster than hash-based lookups due to better cache locality and lower overhead.
License
MIT