Class NormPerformance
- java.lang.Object
-
- org.apache.commons.numbers.examples.jmh.core.NormPerformance
-
- Direct Known Subclasses:
NormPerformance_jmhType_B1
public class NormPerformance extends Object
Execute benchmarks for the methods in theNormclass.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNormPerformance.VectorArrayInputClass providing input vectors for benchmarks.static classNormPerformance.VectorArrayInput2DClass providing 2D input vectors for benchmarks.
-
Constructor Summary
Constructors Constructor Description NormPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbaseline(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Compute a baseline performance metric with a method that does nothing.voiddirectEuclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Compute a baseline performance metric using direct computation of the Euclidean norm.voideuclidean2d(NormPerformance.VectorArrayInput2D input, org.openjdk.jmh.infra.Blackhole bh)Compute the performance of theNorm.L22D method.voideuclidean3d(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Compute the performance of theNorm.L23D norm computation.voideuclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)Compute the performance of theNorm.L2array norm method.voidhypot(NormPerformance.VectorArrayInput2D input, org.openjdk.jmh.infra.Blackhole bh)Compute a baseline performance metric usingMath.hypot(double, double).
-
-
-
Method Detail
-
baseline
public void baseline(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute a baseline performance metric with a method that does nothing.- Parameters:
input- benchmark inputbh- blackhole
-
directEuclideanArray
public void directEuclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute a baseline performance metric using direct computation of the Euclidean norm.- Parameters:
input- benchmark inputbh- blackhole
-
hypot
public void hypot(NormPerformance.VectorArrayInput2D input, org.openjdk.jmh.infra.Blackhole bh)
Compute a baseline performance metric usingMath.hypot(double, double).- Parameters:
input- benchmark inputbh- blackhole
-
euclidean2d
public void euclidean2d(NormPerformance.VectorArrayInput2D input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L22D method.- Parameters:
input- benchmark inputbh- blackhole
-
euclidean3d
public void euclidean3d(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L23D norm computation.- Parameters:
input- benchmark inputbh- blackhole
-
euclideanArray
public void euclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L2array norm method.- Parameters:
input- benchmark inputbh- blackhole
-
-