diff --git a/makefile b/makefile index 7da1153..939f35a 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,9 @@ debug: test.cpp magyarsort.h g++ test.cpp -g -std=c++17 -o test.out +debug_ypsu: ypsu.cpp magyarsort.h + g++ ypsu.cpp -g -std=c++17 -o ypsu.out + release_coz: test.cpp magyarsort.h g++ test.cpp -DNDEBUG -g1 -gdwarf-2 -std=c++17 -O2 -ldl -o test.out @@ -13,6 +16,12 @@ release: test.cpp magyarsort.h release_ypsu: ypsu.cpp magyarsort.h g++ ypsu.cpp -DNDEBUG -std=c++17 -O2 -o ypsu.out +release_ypsu_assert: ypsu.cpp magyarsort.h + g++ ypsu.cpp -std=c++17 -O2 -o ypsu.out + +release_ypsu_debug_sym: ypsu.cpp magyarsort.h + g++ ypsu.cpp -g -std=c++17 -O2 -o ypsu.out + release3: test.cpp magyarsort.h g++ test.cpp -DNDEBUG -std=c++17 -O3 -o test.out diff --git a/ypsu.cpp b/ypsu.cpp index e832f0f..1b39d96 100644 --- a/ypsu.cpp +++ b/ypsu.cpp @@ -18,6 +18,8 @@ #define MAGYAR_SORT_DEFAULT_REUSE #include "magyarsort.h" + #include "space_partitioning_sort/spsort.h" + std::map results; std::map worst; void measure(const std::string &inputtype, const std::string &name, @@ -391,8 +393,9 @@ } int main(void) { - int n = 100000000; + //int n = 100000000; //int n = 10000000; + int n = 100; for (auto inputtype : inputtypes) { printf("%10s", inputtype.c_str()); fflush(stdout); @@ -433,10 +436,13 @@ measure(inputtype, "4rot", [&] { fourrots(&w[0], w.size()); }); assert(w == expected); w = v; - measure(inputtype, "frewr", [&] { frewr(&w[0], w.size()); }); + measure(inputtype, "sp", [&] { spsort(&w[0], w.size()); }); assert(w == expected); /* w = v; + measure(inputtype, "frewr", [&] { frewr(&w[0], w.size()); }); + assert(w == expected); + w = v; measure(inputtype, "vsort", [&] { vsort(&w[0], w.size()); }); assert(w == expected); */