aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/benchmark/sort
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/generic/benchmark/sort
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/benchmark/sort')
-rw-r--r--util/generic/benchmark/sort/main.cpp136
-rw-r--r--util/generic/benchmark/sort/ya.make14
2 files changed, 75 insertions, 75 deletions
diff --git a/util/generic/benchmark/sort/main.cpp b/util/generic/benchmark/sort/main.cpp
index d58f491f4d..48fbd2052a 100644
--- a/util/generic/benchmark/sort/main.cpp
+++ b/util/generic/benchmark/sort/main.cpp
@@ -1,77 +1,77 @@
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/generic/algorithm.h>
-#include <util/generic/vector.h>
-#include <util/generic/xrange.h>
-
-Y_CPU_BENCHMARK(Sort1, iface) {
+
+#include <util/generic/algorithm.h>
+#include <util/generic/vector.h>
+#include <util/generic/xrange.h>
+
+Y_CPU_BENCHMARK(Sort1, iface) {
TVector<int> x = {1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- Sort(x);
- }
-}
-
-Y_CPU_BENCHMARK(Sort2, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ Sort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(Sort2, iface) {
TVector<int> x = {2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- Sort(x);
- }
-}
-
-Y_CPU_BENCHMARK(Sort4, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ Sort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(Sort4, iface) {
TVector<int> x = {4, 3, 2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- Sort(x);
- }
-}
-
-Y_CPU_BENCHMARK(Sort16, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ Sort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(Sort16, iface) {
TVector<int> x = {16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- Sort(x);
- }
-}
-
-Y_CPU_BENCHMARK(StableSort1, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ Sort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(StableSort1, iface) {
TVector<int> x = {1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- StableSort(x);
- }
-}
-
-Y_CPU_BENCHMARK(StableSort2, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ StableSort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(StableSort2, iface) {
TVector<int> x = {2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- StableSort(x);
- }
-}
-
-Y_CPU_BENCHMARK(StableSort4, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ StableSort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(StableSort4, iface) {
TVector<int> x = {4, 3, 2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- StableSort(x);
- }
-}
-
-Y_CPU_BENCHMARK(StableSort16, iface) {
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ StableSort(x);
+ }
+}
+
+Y_CPU_BENCHMARK(StableSort16, iface) {
TVector<int> x = {16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
-
- for (const auto i : xrange(iface.Iterations())) {
- Y_UNUSED(i);
- StableSort(x);
- }
-}
+
+ for (const auto i : xrange(iface.Iterations())) {
+ Y_UNUSED(i);
+ StableSort(x);
+ }
+}
diff --git a/util/generic/benchmark/sort/ya.make b/util/generic/benchmark/sort/ya.make
index 7059abc3a4..bd830bbe1d 100644
--- a/util/generic/benchmark/sort/ya.make
+++ b/util/generic/benchmark/sort/ya.make
@@ -1,10 +1,10 @@
Y_BENCHMARK()
-
+
OWNER(g:util)
SUBSCRIBER(g:util-subscribers)
-
-SRCS(
- main.cpp
-)
-
-END()
+
+SRCS(
+ main.cpp
+)
+
+END()