[Haskell-cafe] Re: Hashtable woes

Ketil Malde ketil.malde at bccs.uib.no
Fri Feb 10 04:34:41 EST 2006


> indicates that it triggers a bug in 6.4.1

Ah, I missed that.

For my word counting indexes, I've settled on Data.Map, calculating an
Int or Integer hash for each word (depending on word length, which is
fixed).  I haven't given it nearly the effort the shootout programs
have seen, though, so I'm not sure how optimal it is.

Other experiences with FiniteMap/Data.Map etc seem to indicate that
they are in the same ball park as Python's hashes.

> We never pounded on Data.Map, but I suspect it cannot be as bad as
> Data.Hashtable. 

Hmm...perhaps it is worth it, then?  The benchmark may specify "hash
table", but I think it is fair to interpret it as "associative data
structure" - after all, people are using "associative arrays" that
(presumably) don't guarantee a hash table underneath, and it can be
argued that Data.Map is the canonical way to achieve that in Haskell. 

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-Cafe mailing list