[Haskell-cafe] more shootout madness -- hashes in GHC

Simon Marlow simonmar at microsoft.com
Fri Oct 8 06:24:42 EDT 2004

On 07 October 2004 20:53, Robert wrote:

> I've been playing around with the "Hashes, Part II" code from the
> shootout.  I wanted to try to implement this test using Data.HashTable
> instead of Data.FiniteMap to see if that would buy us anything.  In
> fact, the HashTable implementation is consistantly faster than
> FiniteMap, but not by a lot (thus making the transition to the IO
> monad not worthwhile IMO).  The interesting thing, however, is that
> at a certain number of iterations (106 in my case), the Hashtable code
> segfaults.  GDB shows that it is blowing the top off the program stack
> and dying when it tries to write to kernel space.  (can't write to
> 0xbfffffff).

Thanks, that's a good bug to catch just before the 6.2.2 release.  There
is a performance bug in the 6.2.2 HashTable implementation which we
already found, but I forgot to merge into the 6.2 branch.  The
performance bug caused the table to overflow, leading to the segfault
(not checking for overflow is another bug).

Upshot: this will be fixed in 6.2.2.  Furthermore, performance will be


More information about the Haskell-Cafe mailing list