[Haskell-cafe] lookup tables & style guidelines
Ketil Malde
ketil at malde.org
Thu Apr 24 02:31:54 EDT 2008
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 rewrote (roughly) a Python program in Haskell, and it was my
impression back then that Python's associative arrays was faster than
Haskell maps - but this could well have been back in the FiniteMap
days, and I don't think I benchmarked very precisely.
Anyway, there's a Google Summer-of-code project that will hopefully
produce some benchmarks of the different alternatives.
Data.Map tends to consume a lot of memory as well.
But - Data.(Int)Map is likely to be the easiest available - I'd try
that first, and if things are still too slow, profile, and then look
for alternatives.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe
mailing list