diff --git a/app/src/jmh/java/de/uni_marburg/powersort/benchmark/MainJmh.java b/app/src/jmh/java/de/uni_marburg/powersort/benchmark/MainJmh.java index 31cb83e..6c194c1 100644 --- a/app/src/jmh/java/de/uni_marburg/powersort/benchmark/MainJmh.java +++ b/app/src/jmh/java/de/uni_marburg/powersort/benchmark/MainJmh.java @@ -22,9 +22,9 @@ import java.util.concurrent.TimeUnit; /* * Benchmark parameters */ -@Fork(0) -@Warmup(iterations = 0) -@Measurement(iterations = 1) +@Fork(1) +@Warmup(iterations = 1) +@Measurement(iterations = 6) @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) /* diff --git a/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java b/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java index 917446f..90431f0 100644 --- a/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java +++ b/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java @@ -15,6 +15,7 @@ public class Main { final EnumSet sortImplementations = getSortImplementations(); final EnumSet dataEnums = getSortInputSuppliers(); + System.out.println(); for (DataEnum dataEnum : dataEnums) { ObjectSupplier objectSupplier = dataEnum.getObjectSupplier(); System.out.println(dataEnum); @@ -32,6 +33,7 @@ public class Main { final String durFormatted = LongFormatter.formatUnderscore(durMillis); System.out.println(durFormatted + "," + sortImplementation); } + System.out.println(); } } diff --git a/app/src/main/java/de/uni_marburg/powersort/data/DataEnum.java b/app/src/main/java/de/uni_marburg/powersort/data/DataEnum.java index 243f838..d375b5e 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/DataEnum.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/DataEnum.java @@ -1,26 +1,29 @@ package de.uni_marburg.powersort.data; public enum DataEnum { - RANDOM_INTEGERS, - ASCENDING_INTEGERS, - DESCENDING_INTEGERS, - ASCENDING_RUNS, - ASCENDING_RUNS_WITH_OVERLAP; + RANDOM_INTEGERS_300M, + ASCENDING_INTEGERS_300M, + DESCENDING_INTEGERS_250M, + ASCENDING_RUNS_1M, + ASCENDING_RUNS_WITH_OVERLAP_1M; public ObjectSupplier getObjectSupplier() { // We use a seed to get the same random list every time -> Repeatable benchmarks on same input data! // final long seed = 3651660232967549736L; // System.nanoTime() ++ Math.random() final long seed = 140506881906827520L; // (long) 'P' * (long) 'O' *(long) 'W' * (long) 'E' * (long) 'R' * (long) 'S' * (long) 'O' * (long) 'R' * (long) 'T'; - int longListSize = 50_000_000; + int longListSize = 300_000_000; // Any larger: Out of Heap Space. TODO GRADLE config + int middleListSize = 250_000_000; + int runs = 1000; + int runLength = 1000; return switch (this) { - case RANDOM_INTEGERS -> new RandomIntegers(longListSize, seed); - case ASCENDING_INTEGERS -> new AscendingIntegers(longListSize); - case DESCENDING_INTEGERS -> new DescendingIntegers(longListSize); + case RANDOM_INTEGERS_300M -> new RandomIntegers(longListSize, seed); + case ASCENDING_INTEGERS_300M -> new AscendingIntegers(longListSize); + case DESCENDING_INTEGERS_250M -> new DescendingIntegers(middleListSize); - case ASCENDING_RUNS -> AscendingRuns.newAscendingRuns(10_000, 10_000, -10_000); - case ASCENDING_RUNS_WITH_OVERLAP -> AscendingRuns.newAscendingRuns(10_000, 10_000, -5_000); + case ASCENDING_RUNS_1M -> AscendingRuns.newAscendingRuns(runs, runLength, -runLength); + case ASCENDING_RUNS_WITH_OVERLAP_1M -> AscendingRuns.newAscendingRuns(runs, runLength, (int) (-0.5 * runLength)); }; } }