mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-10 01:30:37 -04:00
8348151915
# Description of Changes Defines `SmallHashMap` in `spacetimedb_data_structures`. The data structure is a hybrid map that is backed by a vector and linear scan for the first `M` elements. Then it falls back into a normal hash map. For the first `N` elements, where `N < M`, the vector is stored inline. That is, the vector is a `SmallVec<[(K, V); N>`. The structure is optimized for access patterns where the keys and values are accessed together, therefore, keys and values are not stored separately. # API and ABI breaking changes None, just additive. # Expected complexity level and risk 1 # Testing A comprehensive proptest suite is added for the datastructure.
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.