mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@9404 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2480852657
commit
b142be778f
3 changed files with 29 additions and 6 deletions
|
|
@ -7,23 +7,31 @@ using namespace Upp;
|
|||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
SeedRandom(0);
|
||||
|
||||
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());
|
||||
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);
|
||||
{
|
||||
RTIMING("Sort");
|
||||
Sort(b);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> d = c;
|
||||
RTIMING("std::sort");
|
||||
std::sort(d.begin(), d.end());
|
||||
{
|
||||
RTIMING("std::sort");
|
||||
std::sort(d.begin(), d.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
description "Sorting non-SVO strings\377";
|
||||
|
||||
optimize_speed;
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
LongSort.cpp;
|
||||
LongSort.cpp,
|
||||
info.txt;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
|
|
|||
12
benchmarks/LongSort/info.txt
Normal file
12
benchmarks/LongSort/info.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
TIMING std::sort : 542.00 ms - 542.00 ms (542.00 ms / 1 ), min: 542.00 ms, max: 542.00 ms, nesting: 1 - 1
|
||||
TIMING Sort : 443.00 ms - 443.00 ms (443.00 ms / 1 ), min: 443.00 ms, max: 443.00 ms, nesting: 1 - 1
|
||||
|
||||
TIMING std::sort : 534.00 ms - 534.00 ms (534.00 ms / 1 ), min: 534.00 ms, max: 534.00 ms, nesting: 1 - 1
|
||||
TIMING Sort : 384.00 ms - 384.00 ms (384.00 ms / 1 ), min: 384.00 ms, max: 384.00 ms, nesting: 1 - 1
|
||||
|
||||
-------------------------------
|
||||
TIMING std::sort : 481.00 ms - 481.00 ms (481.00 ms / 1 ), min: 481.00 ms, max: 481.00 ms, nesting: 1 - 1
|
||||
TIMING Sort : 296.00 ms - 296.00 ms (296.00 ms / 1 ), min: 296.00 ms, max: 296.00 ms, nesting: 1 - 1
|
||||
|
||||
TIMING std::sort : 443.00 ms - 443.00 ms (443.00 ms / 1 ), min: 443.00 ms, max: 443.00 ms, nesting: 1 - 1
|
||||
TIMING Sort : 394.00 ms - 394.00 ms (394.00 ms / 1 ), min: 394.00 ms, max: 394.00 ms, nesting: 1 - 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue