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 theNorm
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NormPerformance.VectorArrayInput
Class providing input vectors for benchmarks.static class
NormPerformance.VectorArrayInput2D
Class 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 void
baseline(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute a baseline performance metric with a method that does nothing.void
directEuclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute a baseline performance metric using direct computation of the Euclidean norm.void
euclidean2d(NormPerformance.VectorArrayInput2D input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L2
2D method.void
euclidean3d(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L2
3D norm computation.void
euclideanArray(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L2
array norm method.void
hypot(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.L2
2D method.- Parameters:
input
- benchmark inputbh
- blackhole
-
euclidean3d
public void euclidean3d(NormPerformance.VectorArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Compute the performance of theNorm.L2
3D 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.L2
array norm method.- Parameters:
input
- benchmark inputbh
- blackhole
-
-