[Haskell-cafe] implementing python-style dictionary in Haskell

kenny lu haskellmail at gmail.com
Tue Nov 18 06:34:25 EST 2008


Hi Bulat,



> 1. why you think that your code should be faster? pythob
> implementation is probably written in C ince it's one of its core data
> structures
>

I am not hoping that my code should be faster, but at least not as slow as
what it gets.
Basically I am looking for an implementation which is close to the one in
python.


>
> 2. you can solve IntMap problem by storing list of values with the
> same hash in tree's nodes
>

Yeah, that would probably speed up the building time of the dictionary.
However, storing the list of values in the tree nodes requires storing their
original keys,
so that it maintains the one-key-to-one-value semantics. This would takes up
more space
compared to the Trie approach.

Regards,
Kenny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081118/bcbe0ef9/attachment.htm


More information about the Haskell-Cafe mailing list