[Haskell-cafe] lookup tables & style guidelines

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Apr 24 03:59:32 EDT 2008

On Apr 24, 2008, at 2:31 , Ketil Malde wrote:

> Don Stewart <dons at galois.com> writes:
>>>    1) what is the most performant lookup table/hashtable/ 
>>> dictionary solution
>>>    for Haskell?
>> Data.IntMap is awfully good.
> Is it benchmarked anywhere?  Compared to the Judy bindings, or Adrian
> Hey's AVL trees, or Data.Hashtable?

I don't know if anyone has benched them recently, but some time back  
there was a comparison of Data.HashTable, Data.Map, and Data.IntMap  
posted to one of the Haskell lists; HashTable was usually the  
slowest, and IntMap the fastest because it could take advantage of  
optimizations due to the key being a specific type (among other  
things, IIRC it's unboxed).  This also reduces the memory usage  
compared to the more general Data.Map.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list