[PATCH] D155781: [Support] Change StringMap hash function from xxHash64 to xxh3_64bits
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 22:37:18 PDT 2023
MaskRay created this revision.
MaskRay added reviewers: dblaikie, erikdesjardins, JDevlieghere, lhames, serge-sans-paille.
Herald added subscribers: mgrang, hiraditya, kristof.beyls.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Similar to D142862 <https://reviews.llvm.org/D142862>.
xxh3 is significantly faster than xxh64. Switch to xxh3, as we did for
for lld and llvm-dwarfutil to increase performance (D154813 <https://reviews.llvm.org/D154813> D155675 <https://reviews.llvm.org/D155675>).
While I think StringMap is not a bottleneck for most applications, it
seems good to eliminate the slower xxh64. In addition, according to
D142862 <https://reviews.llvm.org/D142862>, Rust with a large constant string is sensitive to the StringMap
performance.
I have fixed all found issues separately, but two are remaining:
- ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s has a failure due to StringMap iteration order. I think it's a lurking issue in the code but likely usually benign. Perhaps @lhames can take a look?
- lib/ExecutionEngine/Orc/DebugUtils.cpp: adjust 3fcd3669e3dc7c5ba72d3bfceef42b2f833254ec <https://reviews.llvm.org/rG3fcd3669e3dc7c5ba72d3bfceef42b2f833254ec>. This part should be committed separately.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155781
Files:
llvm/lib/ExecutionEngine/Orc/DebugUtils.cpp
llvm/lib/Support/StringMap.cpp
llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
llvm/test/DebugInfo/X86/gnu-public-names.ll
llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155781.542307.patch
Type: text/x-patch
Size: 7059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/3403e378/attachment-0001.bin>
More information about the llvm-commits
mailing list