Skip to content
Snippets Groups Projects
Commit 9543640d authored by Cheng Shao's avatar Cheng Shao
Browse files

rts: use XXH3_64bits hash on all 64-bit platforms

This commit enables XXH3_64bits hash to be used on all 64-bit
platforms. Previously it was only enabled on x86_64, so platforms like
aarch64 silently falls back to using XXH32 which degrades the hashing
function quality.

(cherry picked from commit 4a97bdb8)
parent 5d59bcaa
No related branches found
Tags ghc-7.8.3-release
No related merge requests found
...@@ -99,7 +99,7 @@ int ...@@ -99,7 +99,7 @@ int
hashStr(const HashTable *table, StgWord w) hashStr(const HashTable *table, StgWord w)
{ {
const char *key = (char*) w; const char *key = (char*) w;
#if defined(x86_64_HOST_ARCH) #if WORD_SIZE_IN_BITS == 64
StgWord h = XXH3_64bits_withSeed (key, strlen(key), 1048583); StgWord h = XXH3_64bits_withSeed (key, strlen(key), 1048583);
#else #else
StgWord h = XXH32 (key, strlen(key), 1048583); StgWord h = XXH32 (key, strlen(key), 1048583);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment