[llvm] [ADT] Update hash function of uint64_t for DenseMap (PR #95734)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 15:26:32 PDT 2024


kuhar wrote:

> @ilya-biryukov found that changing the hash function effectively resolves the regression (which I would expect to more or less remove the DenseMap methods from the hot code). But if necessary, I can profile clang on the same compilation with and without this PR.

I'd like to confirm not only this improves the overall performance, but that the speedup can be attributed to 'better' hashing instead of, say, the elements being (coincidentally) in a better order. I don't know the low-level details, but wouldn't this reduce the number of collisions and number of resizes?

https://github.com/llvm/llvm-project/pull/95734


More information about the llvm-commits mailing list