String的Hash算法乘数为31?

 Times 33算法

1. 使用质数冲突率比较小

2. 哈希计算速度快,31等可用移位和减法的方式实现乘法

https://blog.csdn.net/zhanjia/article/details/84923530

猜你喜欢

转载自www.cnblogs.com/dwyer/p/11445306.html