8291729: Reduce runtime of vm.compiler microbenchmarks
Reviewed-by: kvn
This commit is contained in:
parent
0cc49fd9ea
commit
1b66cecd31
@ -46,8 +46,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@Warmup(iterations = 20, time = 1, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Measurement(iterations = 20, time = 1, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Fork(value = 3)
|
@Fork(value = 3)
|
||||||
public class AddIdealNotXPlusC {
|
public class AddIdealNotXPlusC {
|
||||||
|
|
||||||
|
@ -26,28 +26,30 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
import org.openjdk.jmh.annotations.Fork;
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class ArrayAllocation {
|
public class ArrayAllocation {
|
||||||
@Param("128") private int size;
|
@Param("128") private int size;
|
||||||
|
|
||||||
@Fork(value = 1, warmups = 1)
|
|
||||||
@Benchmark
|
@Benchmark
|
||||||
public int eliminateArrayConstLength() {
|
public int eliminateArrayConstLength() {
|
||||||
byte z[] = new byte[128];
|
byte z[] = new byte[128];
|
||||||
return z.length;
|
return z.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, warmups = 1)
|
|
||||||
@Benchmark
|
@Benchmark
|
||||||
public int eliminateArrayVarLength() {
|
public int eliminateArrayVarLength() {
|
||||||
byte z[] = new byte[size];
|
byte z[] = new byte[size];
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -38,6 +41,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class ArrayBoundCheckRemoval {
|
public class ArrayBoundCheckRemoval {
|
||||||
|
|
||||||
private int[] a;
|
private int[] a;
|
||||||
|
@ -24,18 +24,24 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class ArrayClear {
|
public class ArrayClear {
|
||||||
|
|
||||||
@Param("100000")
|
@Param("100000")
|
||||||
|
@ -26,12 +26,15 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -39,6 +42,9 @@ import java.util.Arrays;
|
|||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class ArrayFill {
|
public class ArrayFill {
|
||||||
@Param("65536") private int size;
|
@Param("65536") private int size;
|
||||||
|
|
||||||
|
@ -24,12 +24,15 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
import org.openjdk.jmh.annotations.Level;
|
import org.openjdk.jmh.annotations.Level;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
@ -27,12 +27,12 @@ import org.openjdk.jmh.annotations.*;
|
|||||||
import org.openjdk.jmh.infra.*;
|
import org.openjdk.jmh.infra.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Warmup(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Measurement(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.SECONDS)
|
@OutputTimeUnit(TimeUnit.SECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@Fork(value=1)
|
@Fork(value=2)
|
||||||
public class AutoVectorization2DArray {
|
public class AutoVectorization2DArray {
|
||||||
@Param({"16", "32", "64"})
|
@Param({"16", "32", "64"})
|
||||||
private int LEN;
|
private int LEN;
|
||||||
|
@ -30,6 +30,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class BitSetAndReset {
|
public class BitSetAndReset {
|
||||||
private static final int COUNT = 10_000;
|
private static final int COUNT = 10_000;
|
||||||
|
|
||||||
|
@ -24,14 +24,20 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class BitTest {
|
public class BitTest {
|
||||||
|
|
||||||
private static final int COUNT = 1000;
|
private static final int COUNT = 1000;
|
||||||
|
@ -24,22 +24,26 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
import org.openjdk.jmh.annotations.Fork;
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import org.openjdk.jmh.infra.Blackhole;
|
import org.openjdk.jmh.infra.Blackhole;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Fork(jvmArgsPrepend = {"-XX:-EliminateAllocations", "-XX:-DoEscapeAnalysis"})
|
@Fork(value = 3, jvmArgsPrepend = {"-XX:-EliminateAllocations", "-XX:-DoEscapeAnalysis"})
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.SECONDS)
|
@OutputTimeUnit(TimeUnit.SECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
public class ClearMemory {
|
public class ClearMemory {
|
||||||
class Payload8 {
|
class Payload8 {
|
||||||
public long f0;
|
public long f0;
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -39,6 +42,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class CopyLoop {
|
public class CopyLoop {
|
||||||
|
|
||||||
private MyString s;
|
private MyString s;
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -39,6 +42,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class DivRem {
|
public class DivRem {
|
||||||
|
|
||||||
private static final int ARRAYSIZE = 500;
|
private static final int ARRAYSIZE = 500;
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import org.openjdk.jmh.infra.Blackhole;
|
import org.openjdk.jmh.infra.Blackhole;
|
||||||
|
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
@ -41,6 +44,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class Explosion {
|
public class Explosion {
|
||||||
|
|
||||||
@Param("5")
|
@Param("5")
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class FloatingScalarVectorAbsDiff {
|
public class FloatingScalarVectorAbsDiff {
|
||||||
@Param({"1024"})
|
@Param({"1024"})
|
||||||
public int count;
|
public int count;
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class FpMinMaxIntrinsics {
|
public class FpMinMaxIntrinsics {
|
||||||
private static final int COUNT = 1000;
|
private static final int COUNT = 1000;
|
||||||
|
|
||||||
|
@ -24,10 +24,14 @@
|
|||||||
package org.openjdk.bench.vm.compiler;
|
package org.openjdk.bench.vm.compiler;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.openjdk.jmh.annotations.*;
|
import org.openjdk.jmh.annotations.*;
|
||||||
|
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class IndexVector {
|
public class IndexVector {
|
||||||
@Param({"65536"})
|
@Param({"65536"})
|
||||||
private int count;
|
private int count;
|
||||||
|
@ -24,17 +24,23 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class InnerClassNullRef {
|
public class InnerClassNullRef {
|
||||||
|
|
||||||
class Pickles {
|
class Pickles {
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import org.openjdk.jmh.infra.Blackhole;
|
import org.openjdk.jmh.infra.Blackhole;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -36,6 +39,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class InterfaceCalls {
|
public class InterfaceCalls {
|
||||||
|
|
||||||
interface AnInterface {
|
interface AnInterface {
|
||||||
|
@ -32,10 +32,13 @@ import org.openjdk.jmh.annotations.OutputTimeUnit;
|
|||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
public class InterfacePrivateCalls {
|
public class InterfacePrivateCalls {
|
||||||
interface I {
|
interface I {
|
||||||
private int bar() { return 0; }
|
private int bar() { return 0; }
|
||||||
@ -61,7 +64,7 @@ public class InterfacePrivateCalls {
|
|||||||
@Benchmark
|
@Benchmark
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@Fork(value=1, jvmArgsAppend={"-XX:TieredStopAtLevel=1"})
|
@Fork(value=3, jvmArgsAppend={"-XX:TieredStopAtLevel=1"})
|
||||||
public void invokePrivateInterfaceMethodC1() {
|
public void invokePrivateInterfaceMethodC1() {
|
||||||
for (int i = 0; i < objs.length; ++i) {
|
for (int i = 0; i < objs.length; ++i) {
|
||||||
objs[i].foo();
|
objs[i].foo();
|
||||||
@ -71,7 +74,7 @@ public class InterfacePrivateCalls {
|
|||||||
@Benchmark
|
@Benchmark
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@Fork(value=1)
|
@Fork(value=3)
|
||||||
public void invokePrivateInterfaceMethodC2() {
|
public void invokePrivateInterfaceMethodC2() {
|
||||||
for (int i = 0; i < objs.length; ++i) {
|
for (int i = 0; i < objs.length; ++i) {
|
||||||
objs[i].foo();
|
objs[i].foo();
|
||||||
|
@ -26,18 +26,21 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
import org.openjdk.jmh.annotations.Fork;
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@Fork(1)
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class IterativeEA {
|
public class IterativeEA {
|
||||||
|
|
||||||
public static int ii = 1;
|
public static int ii = 1;
|
||||||
|
@ -29,7 +29,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@Fork(value = 1, jvmArgsAppend = {"-XX:LoopUnrollLimit=1"})
|
@Fork(value = 2, jvmArgsAppend = {"-XX:LoopUnrollLimit=1"})
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
public class LeaInstruction {
|
public class LeaInstruction {
|
||||||
static final int ITERATION = 1000;
|
static final int ITERATION = 1000;
|
||||||
|
@ -27,14 +27,14 @@ import org.openjdk.jmh.annotations.*;
|
|||||||
import org.openjdk.jmh.infra.*;
|
import org.openjdk.jmh.infra.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Warmup(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 3, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Measurement(iterations = 4, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.SECONDS)
|
@OutputTimeUnit(TimeUnit.SECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@Fork(value=1)
|
@Fork(value=3)
|
||||||
public class LoopUnroll {
|
public class LoopUnroll {
|
||||||
@Param({"16", "32", "64", "128", "256", "512", "1024"})
|
@Param({"16", "32", /* "64", "128", "256", "512", */ "1024"})
|
||||||
private int VECLEN;
|
private int VECLEN;
|
||||||
|
|
||||||
private byte[][] a;
|
private byte[][] a;
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.SECONDS)
|
@OutputTimeUnit(TimeUnit.SECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class MacroLogicOpt {
|
public class MacroLogicOpt {
|
||||||
@Param({"64","128","256","512","1024"}) private int VECLEN;
|
@Param({"64","128","256","512","1024"}) private int VECLEN;
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@ import org.openjdk.jmh.infra.Blackhole;
|
|||||||
@BenchmarkMode({Mode.AverageTime})
|
@BenchmarkMode({Mode.AverageTime})
|
||||||
@OutputTimeUnit(TimeUnit.MICROSECONDS)
|
@OutputTimeUnit(TimeUnit.MICROSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class MaxMinOptimizeTest {
|
public class MaxMinOptimizeTest {
|
||||||
private static final int COUNT = 100000;
|
private static final int COUNT = 100000;
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
@ -40,6 +42,8 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*/
|
*/
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
|
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
public class ModPowerOf2 {
|
public class ModPowerOf2 {
|
||||||
|
@ -24,12 +24,15 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -39,6 +42,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class Multiplication {
|
public class Multiplication {
|
||||||
|
|
||||||
@Param("500")
|
@Param("500")
|
||||||
|
@ -24,8 +24,11 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -34,6 +37,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
*/
|
*/
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class PostAllocationStores {
|
public class PostAllocationStores {
|
||||||
|
|
||||||
/** Tests allocation with explicit stores of null/zero to all fields. */
|
/** Tests allocation with explicit stores of null/zero to all fields. */
|
||||||
|
@ -24,15 +24,21 @@
|
|||||||
package org.openjdk.bench.vm.compiler;
|
package org.openjdk.bench.vm.compiler;
|
||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class SharedLoopHeader {
|
public class SharedLoopHeader {
|
||||||
|
|
||||||
private static final int size = 1000;
|
private static final int size = 1000;
|
||||||
|
@ -40,9 +40,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@Warmup(iterations = 10, time = 500, timeUnit = TimeUnit.MILLISECONDS)
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Measurement(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS)
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Fork(3)
|
@Fork(value = 3)
|
||||||
public class Signum {
|
public class Signum {
|
||||||
|
|
||||||
private final int ITERATIONS = 15000;
|
private final int ITERATIONS = 15000;
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Param;
|
import org.openjdk.jmh.annotations.Param;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -38,6 +41,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class SpillCode {
|
public class SpillCode {
|
||||||
|
|
||||||
@Param("10")
|
@Param("10")
|
||||||
|
@ -24,10 +24,13 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -38,6 +41,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class StoreAfterStore {
|
public class StoreAfterStore {
|
||||||
public int s1 = 1, s2 = 2, s3 = 3, s4 = 4, s5 = 5, s6 = 6, s7 = 7, s8 = 8;
|
public int s1 = 1, s2 = 2, s3 = 3, s4 = 4, s5 = 5, s6 = 6, s7 = 7, s8 = 8;
|
||||||
|
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -39,6 +42,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class Straighten {
|
public class Straighten {
|
||||||
|
|
||||||
private int[] intArr;
|
private int[] intArr;
|
||||||
|
@ -25,17 +25,23 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class StringConstructorBenchmark {
|
public class StringConstructorBenchmark {
|
||||||
private byte[] array;
|
private byte[] array;
|
||||||
private String str;
|
private String str;
|
||||||
|
@ -31,8 +31,11 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public abstract class TypeVectorOperations {
|
public abstract class TypeVectorOperations {
|
||||||
@Param({"512","1024", "2048"})
|
@Param({"512", /* "1024", */ "2048"})
|
||||||
public int COUNT;
|
public int COUNT;
|
||||||
|
|
||||||
private byte[] bytesA;
|
private byte[] bytesA;
|
||||||
@ -363,14 +366,14 @@ public abstract class TypeVectorOperations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:+UseSuperWord"
|
"-XX:+UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class TypeVectorOperationsSuperWord extends TypeVectorOperations {
|
public static class TypeVectorOperationsSuperWord extends TypeVectorOperations {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:-UseSuperWord"
|
"-XX:-UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class TypeVectorOperationsNonSuperWord extends TypeVectorOperations {
|
public static class TypeVectorOperationsNonSuperWord extends TypeVectorOperations {
|
||||||
|
@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.Benchmark;
|
|||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||||
import org.openjdk.jmh.annotations.Fork;
|
import org.openjdk.jmh.annotations.Fork;
|
||||||
import org.openjdk.jmh.annotations.Level;
|
import org.openjdk.jmh.annotations.Level;
|
||||||
|
import org.openjdk.jmh.annotations.Measurement;
|
||||||
import org.openjdk.jmh.annotations.Mode;
|
import org.openjdk.jmh.annotations.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
import org.openjdk.jmh.infra.Blackhole;
|
import org.openjdk.jmh.infra.Blackhole;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
@Fork(2)
|
@Fork(2)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
public class UnsignedComparison {
|
public class UnsignedComparison {
|
||||||
|
@ -31,6 +31,8 @@ import java.util.random.RandomGeneratorFactory;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
public abstract class VectorBitCount {
|
public abstract class VectorBitCount {
|
||||||
@Param({"1024"})
|
@Param({"1024"})
|
||||||
public int SIZE;
|
public int SIZE;
|
||||||
@ -70,14 +72,14 @@ public abstract class VectorBitCount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:+UseSuperWord"
|
"-XX:+UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class WithSuperword extends VectorBitCount {
|
public static class WithSuperword extends VectorBitCount {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:-UseSuperWord"
|
"-XX:-UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class NoSuperword extends VectorBitCount {
|
public static class NoSuperword extends VectorBitCount {
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class VectorIntMinMax {
|
public class VectorIntMinMax {
|
||||||
@Param({"2048"})
|
@Param({"2048"})
|
||||||
private int LENGTH;
|
private int LENGTH;
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public abstract class VectorReduction {
|
public abstract class VectorReduction {
|
||||||
@Param({"512"})
|
@Param({"512"})
|
||||||
public int COUNT;
|
public int COUNT;
|
||||||
@ -119,14 +122,14 @@ public abstract class VectorReduction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:+UseSuperWord"
|
"-XX:+UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class WithSuperword extends VectorReduction {
|
public static class WithSuperword extends VectorReduction {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Fork(value = 1, jvmArgsPrepend = {
|
@Fork(value = 2, jvmArgsPrepend = {
|
||||||
"-XX:-UseSuperWord"
|
"-XX:-UseSuperWord"
|
||||||
})
|
})
|
||||||
public static class NoSuperword extends VectorReduction {
|
public static class NoSuperword extends VectorReduction {
|
||||||
|
@ -32,6 +32,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class VectorReductionFloatingMinMax {
|
public class VectorReductionFloatingMinMax {
|
||||||
@Param({"512"})
|
@Param({"512"})
|
||||||
public int COUNT_DOUBLE;
|
public int COUNT_DOUBLE;
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class VectorShiftAccumulate {
|
public class VectorShiftAccumulate {
|
||||||
@Param({"1028"})
|
@Param({"1028"})
|
||||||
public int count;
|
public int count;
|
||||||
|
@ -31,6 +31,9 @@ import java.util.Random;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class VectorShiftRight {
|
public class VectorShiftRight {
|
||||||
@Param({"1024"})
|
@Param({"1024"})
|
||||||
public int SIZE;
|
public int SIZE;
|
||||||
|
@ -24,11 +24,14 @@ package org.openjdk.bench.vm.compiler;
|
|||||||
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark;
|
import org.openjdk.jmh.annotations.Benchmark;
|
||||||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
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.Mode;
|
||||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||||
import org.openjdk.jmh.annotations.Scope;
|
import org.openjdk.jmh.annotations.Scope;
|
||||||
import org.openjdk.jmh.annotations.Setup;
|
import org.openjdk.jmh.annotations.Setup;
|
||||||
import org.openjdk.jmh.annotations.State;
|
import org.openjdk.jmh.annotations.State;
|
||||||
|
import org.openjdk.jmh.annotations.Warmup;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@ -36,6 +39,9 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@BenchmarkMode(Mode.AverageTime)
|
@BenchmarkMode(Mode.AverageTime)
|
||||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||||
@State(Scope.Thread)
|
@State(Scope.Thread)
|
||||||
|
@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS)
|
||||||
|
@Fork(value = 3)
|
||||||
public class WriteBarrier {
|
public class WriteBarrier {
|
||||||
|
|
||||||
// For array references
|
// For array references
|
||||||
|
Loading…
Reference in New Issue
Block a user