added "sp" to tests - buggy for now, but at least in const works and inc nearly ok
This commit is contained in:
parent
fad7345a80
commit
e83392ebaa
9
makefile
9
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
|
||||
|
||||
|
||||
10
ypsu.cpp
10
ypsu.cpp
@ -18,6 +18,8 @@
|
||||
#define MAGYAR_SORT_DEFAULT_REUSE
|
||||
#include "magyarsort.h"
|
||||
|
||||
#include "space_partitioning_sort/spsort.h"
|
||||
|
||||
std::map<std::string, double> results;
|
||||
std::map<std::string, double> 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);
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user