On Tue, 21 Feb 2012 11:25:05 -0800, Johan Tibell <
johan.tibell@gmail.com> wrote:
> On Tue, Feb 21, 2012 at 11:20 AM, Ben Gamari <
bgamari.foss@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.
>
Sure. In my application (machine learning) we were mapping from tokens