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 void sort(T[] a, int lo, int hi, Comparator c, T[] work, int workBase, int workLen) { assert lo == 0; diff --git a/app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort2.java b/app/src/main/java/de/uni_marburg/powersort/sort/DummySort2.java similarity index 93% rename from app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort2.java rename to app/src/main/java/de/uni_marburg/powersort/sort/DummySort2.java index e44b3f7..7bd2e49 100644 --- a/app/src/main/java/de/uni_marburg/powersort/benchmark/DummySort2.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/DummySort2.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; diff --git a/app/src/main/java/de/uni_marburg/powersort/benchmark/MergeSort.java b/app/src/main/java/de/uni_marburg/powersort/sort/MergeSort.java similarity index 98% rename from app/src/main/java/de/uni_marburg/powersort/benchmark/MergeSort.java rename to app/src/main/java/de/uni_marburg/powersort/sort/MergeSort.java index 8fe72fe..393ab63 100644 --- a/app/src/main/java/de/uni_marburg/powersort/benchmark/MergeSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/MergeSort.java @@ -1,4 +1,4 @@ -package de.uni_marburg.powersort.benchmark; +package de.uni_marburg.powersort.sort; import java.util.Comparator; diff --git a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java b/app/src/main/java/de/uni_marburg/powersort/sort/PowerSort.java similarity index 96% rename from app/src/main/java/de/uni_marburg/powersort/PowerSort.java rename to app/src/main/java/de/uni_marburg/powersort/sort/PowerSort.java index 7c7f5fc..8b28520 100644 --- a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/PowerSort.java @@ -1,4 +1,4 @@ -package de.uni_marburg.powersort; +package de.uni_marburg.powersort.sort; import java.util.Comparator; diff --git a/app/src/main/java/de/uni_marburg/powersort/TimSort.java b/app/src/main/java/de/uni_marburg/powersort/sort/TimSort.java similarity index 99% rename from app/src/main/java/de/uni_marburg/powersort/TimSort.java rename to app/src/main/java/de/uni_marburg/powersort/sort/TimSort.java index 8a94942..3bab3b7 100644 --- a/app/src/main/java/de/uni_marburg/powersort/TimSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/sort/TimSort.java @@ -24,7 +24,7 @@ * questions. */ -package de.uni_marburg.powersort; +package de.uni_marburg.powersort.sort; import java.util.Comparator;