[Git][ghc/ghc][master] 3 commits: rts: update xxHash to v0.8.2

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Feb 13 19:10:44 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
b19ec331 by Cheng Shao at 2024-02-13T14:09:46-05:00
rts: update xxHash to v0.8.2

- - - - -
4a97bdb8 by Cheng Shao at 2024-02-13T14:09:46-05:00
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.

- - - - -
ee01de7d by Cheng Shao at 2024-02-13T14:09:46-05:00
rts: define XXH_INLINE_ALL

This commit cleans up how we include the xxhash.h header and only
define XXH_INLINE_ALL, which is sufficient to inline the xxHash
functions without symbol collision.

- - - - -


2 changed files:

- rts/Hash.c
- rts/xxhash.h


Changes:

=====================================
rts/Hash.c
=====================================
@@ -26,9 +26,7 @@
 #endif
 #endif
 
-#define XXH_NAMESPACE __rts_
-#define XXH_STATIC_LINKING_ONLY   /* access advanced declarations */
-#define XXH_IMPLEMENTATION   /* access definitions */
+#define XXH_INLINE_ALL
 
 #include "xxhash.h"
 
@@ -99,7 +97,7 @@ int
 hashStr(const HashTable *table, StgWord 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);
 #else
     StgWord h = XXH32 (key, strlen(key), 1048583);


=====================================
rts/xxhash.h
=====================================
The diff for this file was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/500d8cb8d27ee1b1ec2d9a523f04ca798aa7e497...ee01de7d0443aaf8198f3cc68a6be58998eb68f6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/500d8cb8d27ee1b1ec2d9a523f04ca798aa7e497...ee01de7d0443aaf8198f3cc68a6be58998eb68f6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240213/46959945/attachment-0001.html>


More information about the ghc-commits mailing list