Type Definition idmap::OrderedIdMap
[−]
[src]
type OrderedIdMap<K, V> = IdMap<K, V, DenseEntryTable<K, V>>;
The default IdMap
that preserves insertion order
and requires little space when keys have missing entries.
This is the default way that IdMap
behaves and is recommended for most users,
unless you're really sure that you want a DirectIdMap
.
Insertion order is maintained by having an indirection into an entry array like in OrderMap
.
Essentially, it's a { table: Vec<u32>, entries: Vec<(K, V) }
,
which has little overhead for missing entries.
However the indirection makes access slightly slower than a DirectIdMap
,
and requires slightly more overhead than a DirectIdMap
when entries are actually present.
If you aren't worried about the overhead for missing entries, and you want to avoid the indirection
you could use a DirectIdMap
instead.