2012年8月2日

摘要: // 这个算法在开源的SDBM中使用,似乎对很多不同类型的数据都能得到不错的分布。unsigned int SDBMHash(const char *str){ unsigned int hash = 0 ; while (*str) { // equivalent to: hash = 65599*hash + (*str++); hash = (*str++) + (hash << 6 ) + (hash << 16 ) - hash; } return (hash & 0x7FFFFFFF );}// 从Robert ... 阅读全文
posted @ 2012-08-02 09:34 liugoodness 阅读(1352) 评论(0) 推荐(0)

导航