mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@10063 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
266c3c8c6d
commit
91a2feead6
3 changed files with 39 additions and 0 deletions
26
benchmarks/CoSort/CoSort.cpp
Normal file
26
benchmarks/CoSort/CoSort.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||
|
||||
Vector<String> 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);
|
||||
}
|
||||
}
|
||||
9
benchmarks/CoSort/CoSort.upp
Normal file
9
benchmarks/CoSort/CoSort.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
CoSort.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "MT";
|
||||
|
||||
4
benchmarks/CoSort/init
Normal file
4
benchmarks/CoSort/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _CoSort_icpp_init_stub
|
||||
#define _CoSort_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue