enummapset merge into containers

Johan Tibell johan.tibell at gmail.com
Tue Feb 21 20:25:05 CET 2012

On Tue, Feb 21, 2012 at 11:20 AM, Ben Gamari <bgamari.foss at gmail.com> wrote:
> 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.

In the case of Ints and newtypes thereof hashing is very cheap. A
no-op or a multiplication with a large prime.

> Anyways, I would be fine with seeing HashMap merged in leiu of
> enummapset. It would be nice to see at least one merged, however.

I'm hurrying slowly on purpose here. I'm almost finished with a new
implementation of HashMap and it's easier to experiment while it's in
a separate package (e.g. people expect less stability.) My goal is to
eventually merge though.

-- Johan

More information about the Libraries mailing list