enummapset merge into containers
bgamari.foss at gmail.com
Tue Feb 21 20:20:46 CET 2012
On Tue, 21 Feb 2012 09:54:08 -0800, Johan Tibell <johan.tibell at gmail.com> wrote:
> Hi Ben,
> We need to discuss the pros and cons of making the API bigger.
> An alternative would be for us to merge unordered-containers into
> containers. HashMaps are as fast as IntMaps for any type that can be
> hashed to an Int, like Enums, but is more widely applicable. However,
> HashMaps are not ordered.
This is certainly an option. It's actually been suggested that I use
HashMaps instead of IntMaps to get more uniform use of the
key-space. I have been a little worried that the cost of hashing would
outweigh the benefit of using benefits of more shallow trees, but I
suppose memory accesses are expensive. That being said, I could
certainly just use the Enum instance.
Anyways, I would be fine with seeing HashMap merged in leiu of
enummapset. It would be nice to see at least one merged, however.
More information about the Libraries