> looking at `The Great Computer Language Shootout' mentioned in another > thread, I wanted to try if Data.HashTable gives better results than > Data.FiniteMap for the spell checker test > http://www.bagley.org/~doug/shootout/bench/spellcheck/ > > I came up with the attached program. With data files > > http://www.bagley.org/data/shootout/spellcheck/Usr.Dict.Words > http://www.bagley.org/data/shootout/spellcheck/Input > > it yields the result > > [EMAIL PROTECTED]:~/t> ./a.out < Input > blooper > cager > cashmere > coming > tablespoonful > zuul > > However, the result should be only `zuul'. Is the problem in > Data.HashTable? I have tested, 6.0, 6.2, 6.2.20040304.
Eek! There are two bugs in Data.HashTable. One correctness, and one performance. Thanks for the report, I'll hold up the 6.2.1 release to get this one in. However, your hash table version of the spell checker doesn't go any faster than the FiniteMap version. I haven't investigated why, though. I did post a hash table version of this program a while back, that I claimed was a factor of 3 faster at the time. Unfortunately the attachment in the archive is in base64 and I can't read it, and I've lost the code :-( If you can decode the attachment, it's here: http://www.haskell.org/pipermail/haskell-cafe/2001-July/002061.html Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users