Probability of getting a duplicate value when calling GetHashCode() on strings

前端 未结 6 1503
遥遥无期
遥遥无期 2020-11-30 10:49

I want to know the probability of getting duplicate values when calling the GetHashCode() method on string instances. For instance, according to th

6条回答
  •  無奈伤痛
    2020-11-30 11:41

    I ran a test on a database of 466k English words and got 48 collisions with string.GetHashCode(). MurmurHash gives slightly better results. More results are here: https://github.com/jitbit/MurmurHash.net

提交回复
热议问题