Bringing the IntMap API up to par with the Map API
johan.tibell at gmail.com
Fri Aug 6 09:59:11 EDT 2010
There are a few functions on Maps that could be implemented on IntMaps but
The above 5 functions can be efficiently implemented on Maps in O(log n)
time, as the size of the subtrees are known, but not not on IntMaps. We
could still provide O(n) versions for IntMap. What's the use case for
indexed lookup in maps? I've never seen it in other languages.
I believe these should these should be straightforward to implement.
I suggest we add these functions to IntMap so one doesn't it's a "no
brainer" to switch from Maps to IntMaps for int keys.
Are there any other functions that should be added to both APIs e.g. strict
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries