I'd like to propose a backward-compatible enhancement that would make the crate more flexible without changing its default behavior.
Feature Request
Add a generic type parameter that allows choosing the fallback map type used when the inline capacity is exceeded.
Today, when the number of elements grows beyond N, SmallMap falls back to a fixed HashMap. This works well for many cases, but some applications would benefit from selecting a different map backend.
Motivation
Different workloads have different needs once maps exceed the inline capacity:
Faster full-map iteration
Some backends (such as IndexMap) have more cache-efficient iteration over medium-sized maps, especially when scanning all entries frequently.
Inline behavior remains unchanged.
Existing users see no behavior changes.
If this sounds reasonable, I’d be happy to attempt a draft PR.
I'd like to propose a backward-compatible enhancement that would make the crate more flexible without changing its default behavior.
Feature Request
Add a generic type parameter that allows choosing the fallback map type used when the inline capacity is exceeded.
Today, when the number of elements grows beyond N, SmallMap falls back to a fixed HashMap. This works well for many cases, but some applications would benefit from selecting a different map backend.
Motivation
Different workloads have different needs once maps exceed the inline capacity:
Faster full-map iteration
Some backends (such as IndexMap) have more cache-efficient iteration over medium-sized maps, especially when scanning all entries frequently.
Inline behavior remains unchanged.
Existing users see no behavior changes.
If this sounds reasonable, I’d be happy to attempt a draft PR.