[llvm] 0ea1183 - [DWARFLinkerParallel] Switch to xxh3_64bits
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 09:56:58 PDT 2023
Author: Fangrui Song
Date: 2023-07-19T09:56:53-07:00
New Revision: 0ea11835d80fc98a4c4618ea27b1b7e75fe5b799
URL: https://github.com/llvm/llvm-project/commit/0ea11835d80fc98a4c4618ea27b1b7e75fe5b799
DIFF: https://github.com/llvm/llvm-project/commit/0ea11835d80fc98a4c4618ea27b1b7e75fe5b799.diff
LOG: [DWARFLinkerParallel] Switch to xxh3_64bits
xxh3 is substantially faster than xxh64.
For lld `.debug_str` there is substantial speedup (D154813).
@avl reports that it is around 1-2% improvement for different number of input sets and for different threads configuration.
Reviewed By: avl
Differential Revision: https://reviews.llvm.org/D155675
Added:
Modified:
llvm/include/llvm/ADT/ConcurrentHashtable.h
llvm/include/llvm/DWARFLinkerParallel/StringPool.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/ConcurrentHashtable.h b/llvm/include/llvm/ADT/ConcurrentHashtable.h
index 438159d5c736b1..37c8af36bc73ec 100644
--- a/llvm/include/llvm/ADT/ConcurrentHashtable.h
+++ b/llvm/include/llvm/ADT/ConcurrentHashtable.h
@@ -77,7 +77,7 @@ class ConcurrentHashTableInfoByPtr {
public:
/// \returns Hash value for the specified \p Key.
static inline uint64_t getHashValue(const KeyTy &Key) {
- return xxHash64(Key);
+ return xxh3_64bits(Key);
}
/// \returns true if both \p LHS and \p RHS are equal.
diff --git a/llvm/include/llvm/DWARFLinkerParallel/StringPool.h b/llvm/include/llvm/DWARFLinkerParallel/StringPool.h
index 4828ff4e4b05d3..44383ed6c7ddcc 100644
--- a/llvm/include/llvm/DWARFLinkerParallel/StringPool.h
+++ b/llvm/include/llvm/DWARFLinkerParallel/StringPool.h
@@ -27,7 +27,7 @@ class StringPoolEntryInfo {
public:
/// \returns Hash value for the specified \p Key.
static inline uint64_t getHashValue(const StringRef &Key) {
- return xxHash64(Key);
+ return xxh3_64bits(Key);
}
/// \returns true if both \p LHS and \p RHS are equal.
More information about the llvm-commits
mailing list