Search in sources :

Example 1 with SearchProcessor

use of io.netty.buffer.search.SearchProcessor in project netty by netty.

the class SearchRealDataBenchmark method findAll.

@Benchmark
@CompilerControl(Mode.DONT_INLINE)
public void findAll(Blackhole blackHole) {
    SearchProcessor searchProcessor = searchProcessorFactory.newSearchProcessor();
    int pos = 0;
    do {
        pos = haystack.forEachByte(pos, haystackLength - pos, searchProcessor) + 1;
        blackHole.consume(pos);
    } while (pos > 0);
}
Also used : SearchProcessor(io.netty.buffer.search.SearchProcessor) CompilerControl(org.openjdk.jmh.annotations.CompilerControl) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Aggregations

SearchProcessor (io.netty.buffer.search.SearchProcessor)1 Benchmark (org.openjdk.jmh.annotations.Benchmark)1 CompilerControl (org.openjdk.jmh.annotations.CompilerControl)1