.benchmarks

git-svn-id: svn://ultimatepp.org/upp/trunk@14602 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-06-16 21:47:23 +00:00
parent e2f6ad4db3
commit e9069fa3a5
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,25 @@
#include <Core/Core.h>
using namespace Upp;
String RandomString(int len)
{
String h;
while(len-- > 0)
h.Cat(Random(96) + 32);
return h;
}
CONSOLE_APP_MAIN
{
Buffer<String> s(10000), t(10000);
for(int i = 0; i < 10000; i++)
s[i] = RandomString(Random(20));
RTIMING("Set0");
for(int j = 0; j < 10000; j++) {
for(int i = 0; i < 10000; i++)
t[i] = ~s[i];
}
}

View file

@ -0,0 +1,9 @@
uses
Core;
file
StringSet0.cpp;
mainconfig
"" = "";

View file

@ -1,2 +1,4 @@
OLD: VectorMap time: 5742398 ms
NEW: VectorMap time: 5888610 ms
VectorMap time: 5524707 ms