I have a list of (64-bit) addresses that represent a stack frame, and I want to hash these to a single 64-bit number to help identify those that have been seen before. There are at most 128 addresses.
My current algorithm calculates the hash by iterating through the list, xor'ing each address into the hash and rotating the hash by 11 bits per cycle.
Any better suggestions?
You might consider some sort of CRC.
Perhaps a CRC64.
There are a couple of nice integer hash functions here, for both 32 and 64 bit: http://www.concentric.net/~Ttwang/tech/inthash.htm
Also there's some written on it here: http://burtleburtle.net/bob/hash/evahash.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With