2 ms·
The downside of something like indexmap is now removal is O(n)
by assbuttbuttass 2y ago
The downside of something like indexmap is now removal is O(n)
- masklinn 2y agoIf you do the remove naively yes, but you can use tombstoning which amortises the cost (at that of an increased iteration overhead), or using a non-order-preserving remove (like indexmap itself, though `remove` has been deprecated and you now get to pick your poison).