This is an automated email from the ASF dual-hosted git repository. aherbert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push: new cf2ba48 ConstructionPerformance: Fix pre-allocation of single seed arrays. cf2ba48 is described below commit cf2ba480595df791b7103d0bf75f261ddfa098b4 Author: Alex Herbert <aherb...@apache.org> AuthorDate: Fri Mar 1 20:57:22 2019 +0000 ConstructionPerformance: Fix pre-allocation of single seed arrays. --- .../apache/commons/rng/examples/jmh/ConstructionPerformance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/ConstructionPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/ConstructionPerformance.java index 45fe79e..ba732e0 100644 --- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/ConstructionPerformance.java +++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/ConstructionPerformance.java @@ -76,7 +76,7 @@ import org.apache.commons.rng.simple.internal.ProviderBuilder.RandomSourceIntern @Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) @State(Scope.Benchmark) -@Fork(value = 1, jvmArgs = { "-server", "-Xms128M", "-Xmx128M" }) +@Fork(value = 1, jvmArgs = { "-server", "-Xms512M", "-Xmx512M" }) public class ConstructionPerformance { /** The number of different constructor seeds. */ @@ -111,8 +111,8 @@ public class ConstructionPerformance { longArray[j] = rng.nextLong(); intArray[j] = (int) longArray[j]; } - LONG_SEEDS[i] = longArray[i]; - INTEGER_SEEDS[i] = intArray[i]; + LONG_SEEDS[i] = longArray[0]; + INTEGER_SEEDS[i] = intArray[0]; LONG_ARRAY_SEEDS[i] = longArray; INT_ARRAY_SEEDS[i] = intArray; BYTE_ARRAY_SEEDS[i] = NumberFactory.makeByteArray(longArray);