Data.HashTable bug

Simon Marlow simonmar at
Fri Mar 19 11:00:27 EST 2004

> 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
> I came up with the attached program.  With data files
> it yields the result
> carsten at penne:~/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:


More information about the Glasgow-haskell-users mailing list