8290391: Reduce runtime of java.util package microbenchmarks

Reviewed-by: rriggs, redestad
This commit is contained in:
Eric Caspole 2022-07-19 16:30:44 +00:00
parent bbc57483ce
commit 2cb659e7f4
16 changed files with 90 additions and 104 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022, cle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
@ -38,9 +39,12 @@ import org.openjdk.jmh.annotations.Warmup;
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@State(Scope.Thread)
@Warmup(iterations = 4, time = 2)
@Measurement(iterations = 4, time = 2)
@Fork(value = 3)
public class ArraysMismatchPartialInlining {
@Param({"3", "4", "5", "6", "7", "15", "31", "63", "95", "800"})
@Param({"3", "7", "15", "31", "63", "95", "800"})
private static int size;
byte [] barray1;