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.

Attachment: signature.asc
Description: Digital signature

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

Reply via email to