« Return to Thread: Why does this program eat RAM?

Re: Re[2]: Why does this program eat RAM?

by Udo Stenzel :: Rate this Message:

Reply to Author | View in Thread

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.


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (196 bytes) Download Attachment

 « Return to Thread: Why does this program eat RAM?