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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 08:31:26 PDT 2024


nikic wrote:

Compile-time for the PR as proposed: http://llvm-compile-time-tracker.com/compare.php?from=3ca17443ef4af21bdb1f3b4fbcfff672cbc6176c&to=9cd0b838265006ff699153bfbb1a1a39ebfb9cdd&stat=instructions:u

Compile-time using xor mixing (that is, https://github.com/llvm/llvm-project/commit/820edb52ce1abc090f41c5210dcb04edb6203f36 applied on top): http://llvm-compile-time-tracker.com/compare.php?from=3ca17443ef4af21bdb1f3b4fbcfff672cbc6176c&to=820edb52ce1abc090f41c5210dcb04edb6203f36&stat=instructions%3Au

It doesn't seem like we get any benefit out of the better mixing for average-case compilation, so I think you should stick to your first variant using xor.

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


More information about the llvm-commits mailing list