[Haskell-cafe] Why does this program eat RAM?

Udo Stenzel u.stenzel at web.de
Tue Sep 5 07:05:49 EDT 2006


Bulat Ziganshin wrote:
> Data.HashTable may be a faster alternative for Map (if ordering isn't
> required)

Or it may not.  Finding a good hash function for the words John is
counting, is a challenge itself.  Finding a good one that doesn't look
at each character at least once, might be outright impossible.  That
means, a hash table cannot do significantly less work than the
appropriate data structure, which is a trie, aka Data.StringMap.


Udo.
-- 
Q:      Why do mountain climbers rope themselves together?
A:      To prevent the sensible ones from going home.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060905/0a99fe9d/attachment.bin


More information about the Haskell-Cafe mailing list