search for: unused_bits

Displaying 2 results from an estimated 2 matches for "unused_bits".

Did you mean: inuse_bits
2017 Jan 10
2
Default hashing function for integers (DenseMapInfo.h)
...I did was compiling a C++ file with clang. I did 10 tests for every version of clang/llvm compiled with the hash function, and here are the best timings: - Original LLVM: hash(k) = (k >> 4) ^ (k >> 9) 3.40s - Stupid hash: hash(k) = k 3.55s - A bit less stupid: hash(k) = k >> unused_bits (defined by sizeof(T) = 2^unused_bits) 3.47s - Murmurhash3 3.47s So different hashing functions make a difference. For pointers, it seems that the one used by LLVM is quite good. It gives the best performance here. It is quite surprising that Murmurhash3 does not behave better than the “A bit...
2017 Jan 10
3
Default hashing function for integers (DenseMapInfo.h)
> On Jan 10, 2017, at 8:56 AM, Mehdi Amini <mehdi.amini at apple.com> wrote > > Some tests I can suggest is to replace the hash function with your favorite and: Thanks. I’ll give it a try. It will take some time as I need to rewrite DenseMap if I want to use the Knuth multiplicative hash. > ultimately I believe real-world impact is the best way to get a change in. That’s