我正在使用Roaring Bitmap 0.7.14 创建一个布隆过滤器。整数值在0到838,860,800之间。映射中有70,429,378个唯一的整数。我想序列化优化后的位图。但是优化并没有被踢进去。是否需要额外的设置才能使优化生效?
System.out.println(" getCardinality long "+
this.bitmap.getLongCardinality());// 70429378
System.out.println(" getSizeInBytes "+
this.bitmap.getSizeInBytes());// 104883208
System.out.println(" runOptimize was done? " +
this.bitmap.runOptimize());// false
this.bitmap.serialize(out);
System.out.println(" serializedSizeInBytes "+
this.bitmap.serializedSizeInBytes());// 104960008发布于 2018-07-14 05:27:09
似乎每个整数值使用了大约11位,这比使用Set<Int>甚至是int数组要好得多。
是什么让您认为您的特定集应该从运行压缩中受益?你的数据有很多连续的值吗?
https://stackoverflow.com/questions/51332112
复制相似问题