Class SumPerformance
- java.lang.Object
-
- org.apache.commons.numbers.examples.jmh.core.SumPerformance
-
- Direct Known Subclasses:
SumPerformance_jmhType_B1
public class SumPerformance extends Object
Executes a benchmark to measure the speed of operations in theSum
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SumPerformance.ArrayInput
Class providing double arrays for benchmarks.
-
Constructor Summary
Constructors Constructor Description SumPerformance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
baselineDouble(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use two input arrays.void
baselineSingle(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use a single input array.void
sum(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSum
addition performance.void
sumOfProducts(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSum
linear combination performance.
-
-
-
Method Detail
-
baselineSingle
public void baselineSingle(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use a single input array.- Parameters:
input
- benchmark inputbh
- data sink
-
baselineDouble
public void baselineDouble(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark baseline for functions that use two input arrays.- Parameters:
input
- benchmark inputbh
- data sink
-
sum
public void sum(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSum
addition performance.- Parameters:
input
- benchmark inputbh
- data sink
-
sumOfProducts
public void sumOfProducts(SumPerformance.ArrayInput input, org.openjdk.jmh.infra.Blackhole bh)
Benchmark testingSum
linear combination performance.- Parameters:
input
- benchmark inputbh
- data sink
-
-