Refine search
@Benchmark @OperationsPerInvocation(ITERATIONS) public void nanoTime(Blackhole blackhole) { for (int i = 0; i < ITERATIONS; i++) { blackhole.consume(System.nanoTime()); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalLongs(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = longRows.get(i); int rv = incIndex.add(row).getRowCount(); blackhole.consume(rv); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalFloats(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = floatRows.get(i); int rv = incFloatIndex.add(row).getRowCount(); blackhole.consume(rv); } }
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @OperationsPerInvocation(maxRows) public void normalStrings(Blackhole blackhole) throws Exception { for (int i = 0; i < maxRows; i++) { InputRow row = stringRows.get(i); int rv = incStrIndex.add(row).getRowCount(); blackhole.consume(rv); } } }
@Benchmark @OperationsPerInvocation(5) public Object baselineLength5(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 5, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(6) public Object baselineLength6(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 6, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(5) public Object optimizedLength5(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 5, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(7) public Object optimizedLength7(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 7, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(ITERATIONS) public void cpuTime(Blackhole blackhole) { for (int i = 0; i < ITERATIONS; i++) { blackhole.consume(currentThreadCpuTime()); } }
@Benchmark @OperationsPerInvocation(4) public Object baselineLength4(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 4, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(3) public Object optimizedLength3(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 3, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(3) public Object baselineLength3(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 3, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(4) public Object optimizedLength4(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 4, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(2) public Object baselineLength2(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 2, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(7) public Object baselineLength7(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 7, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(256) public Object baselineLength256(BenchmarkData data) throws Throwable { data.input.setPosition(0); unpackGeneric(data.buffer, 0, 256, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(2) public Object optimizedLength2(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 2, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(6) public Object optimizedLength6(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 6, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(256) public Object optimizedLength256(BenchmarkData data) throws Throwable { data.input.setPosition(0); data.packer.unpack(data.buffer, 0, 256, data.bits, data.input); return data.buffer; }
@Benchmark @OperationsPerInvocation(ITERATIONS) public void userTime(Blackhole blackhole) { for (int i = 0; i < ITERATIONS; i++) { blackhole.consume(currentThreadUserTime()); } }