diff --git a/benchmarks/CoSort/CoSort.cpp b/benchmarks/CoSort/CoSort.cpp new file mode 100644 index 000000000..51c95df22 --- /dev/null +++ b/benchmarks/CoSort/CoSort.cpp @@ -0,0 +1,26 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + StdLogSetup(LOG_FILE|LOG_COUT); + + Vector h; + for(int i = 0; i < 10000000; i++) + h.Add(AsString(Random())); + + { + auto h1 = clone(h); + TimeStop tm; + Sort(h1); + RLOG("Sort " << tm); + } + + { + auto h1 = clone(h); + TimeStop tm; + CoSort(h1); + RLOG("CoSort " << tm); + } +} diff --git a/benchmarks/CoSort/CoSort.upp b/benchmarks/CoSort/CoSort.upp new file mode 100644 index 000000000..7e521a0e3 --- /dev/null +++ b/benchmarks/CoSort/CoSort.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + CoSort.cpp; + +mainconfig + "" = "MT"; + diff --git a/benchmarks/CoSort/init b/benchmarks/CoSort/init new file mode 100644 index 000000000..0344e50d3 --- /dev/null +++ b/benchmarks/CoSort/init @@ -0,0 +1,4 @@ +#ifndef _CoSort_icpp_init_stub +#define _CoSort_icpp_init_stub +#include "Core/init" +#endif