[PATCH] D154812: [Support] Add llvm::xxh3_64bits
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 12:45:37 PDT 2023
MaskRay added a comment.
In D154812#4511112 <https://reviews.llvm.org/D154812#4511112>, @andrewng wrote:
> I haven't looked at the code but I have built `ld.lld` with this patch and the patch from D154813 <https://reviews.llvm.org/D154813> on Windows with both VS 2022 `cl` 19.36.32537 and `clang-cl` 16.0.6. I have run the usual benchmarks (clang, chrome, mozilla, scylla) and also a UE5 link and I don't see any difference in performance on my Windows 10 PC, i.e. any delta is in the measurement "noise".
Thank you for benchmarking this on Windows. Do these programs have large `.debug_str` sections? (Windows builds normally use CodeView/PDB, not DWARF).
I think only any effect is likely only observed with large `.debug_str` sections. To observe the effect of replacing the hash function, I need to compute the time ratio of hashing
> The remaining part of lld remains unchanged. Consequently, a lower ratio indicates that hashing is faster.
I have observed ~2% speedup on an x86-64 machine, but the result on an aarch64 machine (Cavium ThunderX2) is so-so.
In PiotrZSL's setup the speedup seems larger?
I think xxh3 is still worth it and we can probably drop the xxh64 implementation once internal implementations have migrated.
% hyperfine --warmup 1 --min-runs 16 "numactl -C 16-23 "{/tmp/lld0,/tmp/lld1}" -flavor gnu @response.txt --threads=8"
Benchmark 1: numactl -C 16-23 /tmp/lld0 -flavor gnu @response.txt --threads=8
Time (mean ± σ): 7.393 s ± 0.089 s [User: 17.077 s, System: 4.274 s]
Range (min … max): 7.208 s … 7.561 s 16 runs
Benchmark 2: numactl -C 16-23 /tmp/lld1 -flavor gnu @response.txt --threads=8
Time (mean ± σ): 7.351 s ± 0.093 s [User: 16.757 s, System: 4.236 s]
Range (min … max): 7.165 s … 7.519 s 16 runs
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154812/new/
https://reviews.llvm.org/D154812
More information about the llvm-commits
mailing list