Skip to content

rts: Update inpackage XXHASH to 0.8 and use XXH3 on 64-bit platforms.

Tamar Christina requested to merge Phyx/ghc:upgrade-xxxhash-to-newest into master

Hi,

This updates out in-tree copy of XXHash to version 0.8 which contains a new production ready hashing function called XXH3 which is now used by the 64-bit platforms by default.

The Hash functions are also inlined into Hash.c to reduce namespace collisions.

This version offers even greater performance on modern systems (requires AVX2 for best performance but SSE2 is already enough to get a nice speed up).

This also changes the interface files from using MD5 to xxHash as well. While xxHash is not a cryptographic hash it does pass smhasher's extensive testsuite for Hash functions. https://github.com/rurban/smhasher

If a collision were to occur it would need to conflict between all the hashes in the interface file. with a 128-bit hash the probabilities of that are minuscule that it occurs naturally..

An unnatural occurrence can already be created with MD5, as such I don't think this is a regression. However since a collision doesn't do anything destructive there is no security risk here. Just a file won't be re-compiled.

61976096-b3a35f00-af9f-11e9-8229-e0afc506c6ec_1_

61976089-aedeab00-af9f-11e9-9239-e5375d6c080f_1_

This improves our lookup and inserts into the linker maps.

Ok for master?

Edited by Ben Gamari

Merge request reports