#1342 Improve quality of hash combining
Metadata
Property | Value |
---|---|
Reported by | Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de) |
Reported at | Aug 27, 2013 11:13 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Christoph Grüninger (gruenich@iws.uni-stuttgart.de) |
Last edited at | Sep 10, 2013 22:01 |
Closed by | Christoph Grüninger (gruenich@iws.uni-stuttgart.de) |
Closed at | Sep 10, 2013 22:01 |
Closed in version | 2.3 |
Resolution | Implemented |
Comment | Thanks for the patch, applied in ...8082b9e6d591. |
Description
The current algorithm used for hash combining in Dune::hash_combine() has very poor distribution qualities for some of the objects we frequently hash in PDELab.
The attached patch switches to a much more robust algorithm inspired by a similar implementation in CityHash (http://cityhash.googlecode.com/svn-history/r2/trunk/src/city.h).
I've done some testing with the objects we hash in PDELab (DOFIndex and ContainerIndex), and the algorithm is much more solid than the old one (the old one tended to create really bad clustering of hash values).