Skip to main content

Module tiny_det_map

Module tiny_det_map 

Source
Expand description

TinyDetMap<K, V> — small map backed by a sorted Vec.

Optimized for ≤ ~16 entries. Linear scan beats BTreeMap at this size (no node allocation, contiguous memory, branch predictor wins). Iteration order is sorted by K, so output is canonical.

Use for: small parser keyword tables, tiny schema metadata, short enum/member lists, anywhere BTreeMap would feel like overkill but you still want sorted iteration.

Structs§

TinyDetMap