ultimatepp/benchmarks/SortIndex/SortIndex.cpp
cxl adf46bd64e .benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@10262 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-10-04 08:34:25 +00:00

25 lines
313 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
Index<String> n;
Vector<String> v;
for(int i = 0; i < 10000000; i++) {
String s = AsString(Random());
n.Add(s);
v.Add(s);
}
{
RTIMING("Sort");
Sort(v);
}
{
RTIMING("IndexSort");
SortIndex(n);
}
}