ultimatepp/benchmarks/Sort/Sort.cpp
cxl d273b3d97d .benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@15204 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-10-05 11:10:35 +00:00

29 lines
501 B
C++

#include <Core/Core.h>
#include <TestData/TestData.h>
#include <algorithm>
#include <vector>
using namespace Upp;
CONSOLE_APP_MAIN
{
// StdLogSetup(LOG_COUT|LOG_FILE);
for(int i = 0; i < 1000; i++) {
Vector<String> w = AliceWords();
{
std::vector<std::string> x;
for(auto s : w)
x.push_back(s.ToStd());
RTIMING("std::sort std::vector<std::string>");
std::sort(x.begin(), x.end());
}
{
RTIMING("Sort Vector<String>");
Sort(w);
}
ONCELOCK {
RDUMPC(w);
}
}
}