Class CharStreamsBenchmark
java.lang.Object
org.antlr.v4.test.runtime.java.api.perf.jmh.CharStreamsBenchmark
- Direct Known Subclasses:
CharStreamsBenchmark_jmhType_B1
Measures
CharStreams.fromString(String) independently from lexing.
The three data shapes exercise the byte, UTF-16, and code-point backing
stores selected by CodePointBuffer. The source-sized input makes
allocation and conversion work visible without grammar or DFA effects.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendAscii(StringBuilder builder, int length) private static voidappendBmp(StringBuilder builder, int length) private static voidappendSmp(StringBuilder builder, int length) voidfrom_char_buffer_array(CharStreamsBenchmark.CharBufferState state, org.openjdk.jmh.infra.Blackhole blackhole) voidfrom_string(CharStreamsBenchmark.StringState state, org.openjdk.jmh.infra.Blackhole blackhole) voidla_one_then_consume(CharStreamsBenchmark.StringState state, org.openjdk.jmh.infra.Blackhole blackhole) Mirrors the dominant lexer access pattern: look ahead one code point, consume it, and restart from the beginning for the next invocation.
-
Constructor Details
-
CharStreamsBenchmark
public CharStreamsBenchmark()
-
-
Method Details
-
from_string
public void from_string(CharStreamsBenchmark.StringState state, org.openjdk.jmh.infra.Blackhole blackhole) -
from_char_buffer_array
public void from_char_buffer_array(CharStreamsBenchmark.CharBufferState state, org.openjdk.jmh.infra.Blackhole blackhole) -
la_one_then_consume
public void la_one_then_consume(CharStreamsBenchmark.StringState state, org.openjdk.jmh.infra.Blackhole blackhole) Mirrors the dominant lexer access pattern: look ahead one code point, consume it, and restart from the beginning for the next invocation. -
appendAscii
-
appendBmp
-
appendSmp
-