Expand description
SortedVecMap<K, V> — small-to-medium sealed sorted map.
Sorted Vec<(K, V)> with binary-search lookup. The “graduation” of
TinyDetMap for sizes ~16–~10_000 where BTreeMap’s pointer-chasing
cost outweighs Vec’s contiguous-memory wins.
Iteration is sorted by K, so output is canonical. Iteration cost
is O(n); lookup is O(log n). Insert/remove cost is O(n)
(shift), so this is not the structure for hot mutation paths.
Two construction modes:
insertone-by-one —O(n²)total, fine for sealed/build-once.from_sorted_unique—O(n), caller has already sorted.