diff --git a/benchmarks/LongSort/LongSort.cpp b/benchmarks/LongSort/LongSort.cpp index a73a0fde0..642375183 100644 --- a/benchmarks/LongSort/LongSort.cpp +++ b/benchmarks/LongSort/LongSort.cpp @@ -7,23 +7,31 @@ using namespace Upp; CONSOLE_APP_MAIN { + SeedRandom(0); + Vector a; std::vector 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 b = clone(a); - RTIMING("Sort"); - Sort(b); + { + RTIMING("Sort"); + Sort(b); + } } { std::vector d = c; - RTIMING("std::sort"); - std::sort(d.begin(), d.end()); + { + RTIMING("std::sort"); + std::sort(d.begin(), d.end()); + } } } diff --git a/benchmarks/LongSort/LongSort.upp b/benchmarks/LongSort/LongSort.upp index e7ee732e6..5cee0f21e 100644 --- a/benchmarks/LongSort/LongSort.upp +++ b/benchmarks/LongSort/LongSort.upp @@ -1,10 +1,13 @@ description "Sorting non-SVO strings\377"; +optimize_speed; + uses Core; file - LongSort.cpp; + LongSort.cpp, + info.txt; mainconfig "" = ""; diff --git a/benchmarks/LongSort/info.txt b/benchmarks/LongSort/info.txt new file mode 100644 index 000000000..ea249a4fa --- /dev/null +++ b/benchmarks/LongSort/info.txt @@ -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