.benchmarks

git-svn-id: svn://ultimatepp.org/upp/trunk@9399 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-01-16 08:02:13 +00:00
parent 30e44f2824
commit 9a8eac6b62
4 changed files with 45 additions and 0 deletions

View file

@ -2,6 +2,7 @@ uses
Core;
file
test.txt,
AllMaps.cpp optimize_speed;
mainconfig

View file

@ -0,0 +1,29 @@
#include <Core/Core.h>
#include <vector>
using namespace Upp;
#define N 1000000
CONSOLE_APP_MAIN
{
Vector<String> a;
std::vector<std::string> c;
for(int i = 0; i < N; i++) {
String s = AsString(Random()) + AsString(Random()) +
AsString(Random()) + AsString(Random());
a.Add(s);
c.push_back(s.ToStd());
}
{
Vector<String> b = clone(a);
RTIMING("Sort");
Sort(b);
}
{
std::vector<std::string> d = c;
RTIMING("std::sort");
std::sort(d.begin(), d.end());
}
}

View file

@ -0,0 +1,11 @@
description "Sorting non-SVO strings\377";
uses
Core;
file
LongSort.cpp;
mainconfig
"" = "";

4
benchmarks/LongSort/init Normal file
View file

@ -0,0 +1,4 @@
#ifndef _LongSort_icpp_init_stub
#define _LongSort_icpp_init_stub
#include "Core/init"
#endif