indexmap
indexmap copied to clipboard
Use linear search for small IndexMap
trafficstars
When IndexMap is small, e. g. 5 elements, it is faster to:
- not allocate
RawTable - linear search elements
I'm open to folks experimenting with this, but I think it will be nontrivial to plumb that condition through everywhere.
I found halfbrown does this as an enum wrapper over hashbrown::HashMap.
Someone could do the same kind of thing with IndexMap.