We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
布隆过滤器说白了就是位图。 位图默认理解为一个长数组。
布隆过滤器我理解优势是在于string类型hashcode时好一些。 这种查找int类型没必要走二遍hashcode 直接把它的int值赋值就可以了吧。 BitSet bitSet = new BitSet(); int a = 1000; bitSet.set(a, true); System.out.println(bitSet.get(1000) == true); 这个在ip过滤我认为这样也可以。 只是这样如果数据量大内存空间会占的大一些(大约16M int的峰值是2 32次方,我们要实现的话要正负两个BitSet这样)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
布隆过滤器说白了就是位图。
位图默认理解为一个长数组。
布隆过滤器我理解优势是在于string类型hashcode时好一些。
这种查找int类型没必要走二遍hashcode
直接把它的int值赋值就可以了吧。
BitSet bitSet = new BitSet();
int a = 1000;
bitSet.set(a, true);
System.out.println(bitSet.get(1000) == true);
这个在ip过滤我认为这样也可以。
只是这样如果数据量大内存空间会占的大一些(大约16M int的峰值是2 32次方,我们要实现的话要正负两个BitSet这样)
The text was updated successfully, but these errors were encountered: