diff --git a/app/src/jmh/java/de/uni_marburg/powersort/benchmark/BenchmarkJmh.java b/app/src/jmh/java/de/uni_marburg/powersort/benchmark/BenchmarkJmh.java index 197b496..77ea4d6 100644 --- a/app/src/jmh/java/de/uni_marburg/powersort/benchmark/BenchmarkJmh.java +++ b/app/src/jmh/java/de/uni_marburg/powersort/benchmark/BenchmarkJmh.java @@ -1,9 +1,10 @@ package de.uni_marburg.powersort.benchmark; -import de.uni_marburg.powersort.TimSort; +import de.uni_marburg.powersort.sort.DummySort; +import de.uni_marburg.powersort.sort.MergeSort; +import de.uni_marburg.powersort.sort.TimSort; import de.uni_marburg.powersort.data.RandomIntegers; import org.openjdk.jmh.annotations.*; -import org.openjdk.jmh.infra.Blackhole; import java.util.concurrent.TimeUnit; @@ -28,16 +29,15 @@ public class BenchmarkJmh { @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Benchmark - public void rand1DummySort(State1 s, Blackhole bh) { + public void rand1DummySort(State1 s) { DummySort.sort(s.a, 0, s.a.length, NaturalOrder.INSTANCE, null, 0, 0); } @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Benchmark - public void rand1TimSort(State1 s, Blackhole bh) { + public void rand1TimSort(State1 s) { TimSort.sort(s.a, 0, s.a.length, NaturalOrder.INSTANCE, null, 0, 0); - bh.consume(s); } @BenchmarkMode(Mode.AverageTime) 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 39c3938..b4a5c48 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 @@ -1,6 +1,8 @@ package de.uni_marburg.powersort.benchmark; -import de.uni_marburg.powersort.TimSort; +import de.uni_marburg.powersort.sort.DummySort; +import de.uni_marburg.powersort.sort.MergeSort; +import de.uni_marburg.powersort.sort.TimSort; import de.uni_marburg.powersort.data.DescendingIntegers; import de.uni_marburg.powersort.data.RandomIntegers; import de.uni_marburg.powersort.data.ObjectSupplier; diff --git a/app/src/main/java/de/uni_marburg/powersort/ComparableTimSort.java b/app/src/main/java/de/uni_marburg/powersort/sort/ComparableTimSort.java similarity index 99% rename from app/src/main/java/de/uni_marburg/powersort/ComparableTimSort.java rename to app/src/main/java/de/uni_marburg/powersort/sort/ComparableTimSort.java index cd5f3f7..8396420 100644 --- a/app/src/main/java/de/uni_marburg/powersort/ComparableTimSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/ComparableTimSort.java @@ -24,7 +24,7 @@ * questions. */ -package de.uni_marburg.powersort; +package de.uni_marburg.powersort.sort; /** * This is a near duplicate of {@link TimSort}, modified for use with diff --git a/app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort.java b/app/src/main/java/de/uni_marburg/powersort/sort/DummySort.java similarity index 87% rename from app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort.java rename to app/src/main/java/de/uni_marburg/powersort/sort/DummySort.java index ba9e4a5..d766878 100644 --- a/app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/DummySort.java @@ -1,4 +1,4 @@ -package de.uni_marburg.powersort.benchmark; +package de.uni_marburg.powersort.sort; import java.util.Arrays; import java.util.Comparator; @@ -8,7 +8,7 @@ import java.util.Comparator; *
* Uses Arrays.sort() for sorting.
*/
-class DummySort {
+public class DummySort {
public static