bitisony / scalable-bloom-filter

Automatically exported from code.google.com/p/scalable-bloom-filter
0 stars 0 forks source link

Hashcode #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 mun...@paraleloz.com.br on 13 Dec 2011 at 2:43

GoogleCodeExporter commented 9 years ago
I´ve used different hashes in the generator.
hash1 = murmur32bit
hash2 = Fnv1a

It helps the first suggestion.

Original comment by mun...@paraleloz.com.br on 13 Dec 2011 at 2:57