Skip to content

HashTable.hashString broken

The output of HashTable.hashString is seriously broken in GHC 6.6.

Here is a sample of the output with some strings zipped with their hash values:

[(97,"a"),(59,"ba"),(74,"cba"),(69,"dcab"),(73,"edbac"),(72,"fecabd"),(73,"gfdbace"),(74,"hgecabdf"),(75,"ihfdbaceg"),(75,"jigecabdfh"),(76,"kjhfdbacegi"),(77,"lkigecabdfhj"),(77,"mljhfdbacegik"),(78,"nmkigecabdfhjl"),(79,"onljhfdbacegikm"),(80,"pomkigecabdfhjln"),(80,"qpnljhfdbacegikmo"),(81,"rqomkigecabdfhjlnp"),(82,"srpnljhfdbacegikmoq"),(83,"tsqomkigecabdfhjlnpr"),(83,"utrpnljhfdbacegikmoqs"),(84,"vusqomkigecabdfhjlnprt"),(85,"wvtrpnljhfdbacegikmoqsu"),(85,"xwusqomkigecabdfhjlnprtv"),(86,"yxvtrpnljhfdbacegikmoqsuw"),(87,"zywusqomkigecabdfhjlnprtvx")]

The output from GHC 6.4.2, for comparison:

[(97,"a"),(12641,"ba"),(134650,"cba"),(1348750,"dcab"),(686898,"edbac"),(531877,"fecabd"),(659882,"gfdbace"),(781094,"hgecabdf"),(924023,"ihfdbaceg"),(85405,"jigecabdfh"),(306085,"kjhfdbacegi"),(1152971,"lkigecabdfhj"),(1259361,"mljhfdbacegik"),(1179474,"nmkigecabdfhjl"),(489548,"onljhfdbacegikm"),(231688,"pomkigecabdfhjln"),(805762,"qpnljhfdbacegikmo"),(26414,"rqomkigecabdfhjlnp"),(1005367,"srpnljhfdbacegikmoq"),(394080,"tsqomkigecabdfhjlnpr"),(1010834,"utrpnljhfdbacegikmoqs"),(1178465,"vusqomkigecabdfhjlnprt"),(421802,"wvtrpnljhfdbacegikmoqsu"),(263363,"xwusqomkigecabdfhjlnprtv"),(1417299,"yxvtrpnljhfdbacegikmoqsuw"),(675868,"zywusqomkigecabdfhjlnprtvx")]

Trac metadata
Trac field Value
Version 6.6
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information