Also note that LittleDict
has O(n) lookup cost compared to O(1) for the current Dict
implementation. This means hat if the collection isn’t super small, LittleDict
will perform much, much worse than the current implementation. For dicts that are small, Base already has ImmutableDict
, which has similar performance characteristics for lookup as LittleDict
, so places where you would really see a benefit of using LittleDict
should already be using ImmutableDict
instead of Dict
.
Ordered Dict in Base: Is LittleDict not thread safe, and possibly the reason I can't add it to Base?
4 Likes