Java’s fastest hash function

I have a Boolean string with a length of 128 characters (such as "01100.. 001") (indicating that 128 numbers are 0 / 1) I searched for an efficient (fast) hash function in Java, which produced a much lower representation than 128 bits and significantly reduced collisions Anyone can help me. Is there such a hash function? Any suggestions?

Solution

Try using on a Java string class Hashcode () method, which returns an int, very fast

Or you can do it in Java util. Used on BitSet Hashcode () method, as suggested by pulsar, if you prefer to store data in BitSet

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>