diff --git a/benchmarks/StringSet0/StringSet0.cpp b/benchmarks/StringSet0/StringSet0.cpp new file mode 100644 index 000000000..50fe96d91 --- /dev/null +++ b/benchmarks/StringSet0/StringSet0.cpp @@ -0,0 +1,25 @@ +#include + +using namespace Upp; + +String RandomString(int len) +{ + String h; + while(len-- > 0) + h.Cat(Random(96) + 32); + return h; +} + +CONSOLE_APP_MAIN +{ + Buffer 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]; + } +} diff --git a/benchmarks/StringSet0/StringSet0.upp b/benchmarks/StringSet0/StringSet0.upp new file mode 100644 index 000000000..9557657dd --- /dev/null +++ b/benchmarks/StringSet0/StringSet0.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + StringSet0.cpp; + +mainconfig + "" = ""; + diff --git a/benchmarks/idmapBench/info.txt b/benchmarks/idmapBench/info.txt index c72840b27..8516d8551 100644 --- a/benchmarks/idmapBench/info.txt +++ b/benchmarks/idmapBench/info.txt @@ -1,2 +1,4 @@ OLD: VectorMap time: 5742398 ms NEW: VectorMap time: 5888610 ms + +VectorMap time: 5524707 ms