Skip to content

Instantly share code, notes, and snippets.

@BenchmarkMode(Mode.Throughput)
@State(Scope.Benchmark)
@Fork(value = 1)
@Measurement(iterations = 3, time = 1)
@Warmup(iterations = 3, time = 1)
public class LongNumberParsing {
static final String DIGITS = "1234567890";
static final int REPETITIONS = 100;
static final String LONG_INT = join("", nCopies(REPETITIONS, DIGITS));
static final String LONG_FP = DIGITS + "." + join("", nCopies(REPETITIONS - 1, DIGITS));