use of org.roaringbitmap.RoaringBitmap in project RoaringBitmap by RoaringBitmap.
the class RoaringBitmapBenchmark method inplace_andNot.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public RoaringBitmap inplace_andNot() {
RoaringBitmap b1 = bitmap1.clone();
b1.andNot(bitmap2);
return b1;
}
use of org.roaringbitmap.RoaringBitmap in project RoaringBitmap by RoaringBitmap.
the class RoaringBitmapBenchmark method inplace_andNot.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public RoaringBitmap inplace_andNot() {
RoaringBitmap b1 = bitmap1.clone();
b1.andNot(bitmap2);
return b1;
}
use of org.roaringbitmap.RoaringBitmap in project RoaringBitmap by RoaringBitmap.
the class RoaringBitmapBenchmark method setup.
@Setup
public void setup() {
bitmap1 = new RoaringBitmap();
bitmap2 = new RoaringBitmap();
int k = 1 << 16;
int i = 0;
for (; i < 10000; ++i) {
bitmap1.add(i * k);
}
for (; i < 10050; ++i) {
bitmap2.add(i * k);
bitmap1.add(i * k + 13);
}
for (; i < 20000; ++i) {
bitmap2.add(i * k);
}
bitmap1.add(i * k);
}
use of org.roaringbitmap.RoaringBitmap in project RoaringBitmap by RoaringBitmap.
the class RoaringBitmapBenchmark method inplace_and.
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public RoaringBitmap inplace_and() {
RoaringBitmap b1 = bitmap1.clone();
b1.and(bitmap2);
return b1;
}
use of org.roaringbitmap.RoaringBitmap in project RoaringBitmap by RoaringBitmap.
the class ParallelAggregatorBenchmark method setup.
@Setup(Level.Trial)
public void setup() throws Exception {
bitmaps = DATASET_CACHE.get(dataset, () -> {
System.out.println("Loading" + dataset);
ZipRealDataRetriever dataRetriever = new ZipRealDataRetriever(dataset);
return StreamSupport.stream(dataRetriever.fetchBitPositions().spliterator(), false).map(RoaringBitmap::bitmapOf).toArray(RoaringBitmap[]::new);
});
immutableRoaringBitmaps = Arrays.stream(bitmaps).map(RoaringBitmap::toMutableRoaringBitmap).toArray(ImmutableRoaringBitmap[]::new);
}
Aggregations