Please explain murmur hash?

前端 未结 2 1969
一个人的身影
一个人的身影 2020-12-14 08:56

I just found out murmur hash, seems to be the fastest known and quite collision resistant. I tried to dig more about the algorithm or implementation in full source code, but

2条回答
  •  攒了一身酷
    2020-12-14 09:21

    The code is available here . m and r are constants used by the algorithm. k *= m means take variable k and multiple it by m. k ^= k >> r means take k and right shift the bits r places (e.g. if r is 2 110101 would become 001101) and then XOR it with k.

    Hope that gives you enough to work through the rest.

    Regards

提交回复
热议问题