Data.HashTable

Cale Gibbard cgibbard at gmail.com
Thu Mar 6 15:16:44 EST 2008


On 06/03/2008, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
> Hello.
>
>  When I insert 50 values in an empty hashtable,
>  I get longest chains of length 10. Like this:
>

The Data.HashTable included with GHC probably shouldn't be. In
practice, Data.Map outperforms it in essentially all cases
(Data.HashTable stops working beyond a certain size and so any
asymptotic benefits, if they exist at all, don't have time to kick
in). Moreover, Data.Map has a nice pure interface. The finite maps
provided by Data.Map are not actually hash tables, but instead binary
balanced trees, but who really cares? :)

 - Cale


More information about the Libraries mailing list