首页 > 其他 > 详细

int的hash

时间:2015-04-28 14:19:29      阅读:321      评论:0      收藏:0      [点我收藏+]
func hashInt32(x int) int {   
  x = ((x >> 16) ^ x) * 0x45d9f3b   
  x = ((x >> 16) ^ x) * 0x45d9f3b
  x = ((x >> 16) ^ x)     
  return x 
 }


今天看到一个int的hash函数,地址http://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key


int的hash

原文:http://my.oschina.net/purely/blog/407146

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!