Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashcode #1

Open
GoogleCodeExporter opened this issue Jul 26, 2015 · 1 comment
Open

Hashcode #1

GoogleCodeExporter opened this issue Jul 26, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

In addWithoutCheck() on line:
 int[] hashes = getHashBuckets(Integer.toString(key.hashCode()),this.slicesCount, this.bitsPerSlice);


I suggest you use a 64bit function (key.hashCode()), it scales much better and 
reduce the false positives rate.

I sucefully ported it to .NET using wahbitarray (a compressed bitarray, see 
link below) reducing more the ram and disk space.

http://www.codeproject.com/KB/recipes/WAHBitArray.aspx

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 2:43

@GoogleCodeExporter
Copy link
Author

I´ve used different hashes in the generator.
hash1 = murmur32bit
hash2 = Fnv1a

It helps the first suggestion.

Original comment by [email protected] on 13 Dec 2011 at 2:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant