public Pair readPair() { if (length == -1 || numRead < length) { numRead++; return decompressor.readPair(); } else { return null; } } }
@Benchmark @OperationsPerInvocation(100000) public void decodingGorillaBenchmark(DataGenerator dg, Blackhole bh) throws Exception { LongArrayInput input = new LongArrayInput(dg.compressedArray); GorillaDecompressor d = new GorillaDecompressor(input); Pair pair; while((pair = d.readPair()) != null) { bh.consume(pair); } } }
@Benchmark @OperationsPerInvocation(100000) public void decodingGorillaBenchmark(DataGenerator dg, Blackhole bh) throws Exception { LongArrayInput input = new LongArrayInput(dg.compressedArray); GorillaDecompressor d = new GorillaDecompressor(input); Pair pair; while((pair = d.readPair()) != null) { bh.consume(pair); } } }