aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/benchmark
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/generic/benchmark
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/benchmark')
-rw-r--r--util/generic/benchmark/fastclp2/main.cpp90
-rw-r--r--util/generic/benchmark/fastclp2/metrics/main.py8
-rw-r--r--util/generic/benchmark/fastclp2/metrics/ya.make26
-rw-r--r--util/generic/benchmark/fastclp2/ya.make20
-rw-r--r--util/generic/benchmark/log2/main.cpp186
-rw-r--r--util/generic/benchmark/log2/metrics/main.py8
-rw-r--r--util/generic/benchmark/log2/metrics/ya.make26
-rw-r--r--util/generic/benchmark/log2/ya.make26
-rw-r--r--util/generic/benchmark/rotate_bits/main.cpp124
-rw-r--r--util/generic/benchmark/rotate_bits/metrics/main.py8
-rw-r--r--util/generic/benchmark/rotate_bits/metrics/ya.make26
-rw-r--r--util/generic/benchmark/rotate_bits/ya.make20
-rw-r--r--util/generic/benchmark/vector_count_ctor/f.cpp46
-rw-r--r--util/generic/benchmark/vector_count_ctor/f.h18
-rw-r--r--util/generic/benchmark/vector_count_ctor/main.cpp58
-rw-r--r--util/generic/benchmark/vector_count_ctor/metrics/main.py8
-rw-r--r--util/generic/benchmark/vector_count_ctor/metrics/ya.make26
-rw-r--r--util/generic/benchmark/vector_count_ctor/ya.make28
-rw-r--r--util/generic/benchmark/ya.make22
19 files changed, 387 insertions, 387 deletions
diff --git a/util/generic/benchmark/fastclp2/main.cpp b/util/generic/benchmark/fastclp2/main.cpp
index 69bf1dc960f..49277db077c 100644
--- a/util/generic/benchmark/fastclp2/main.cpp
+++ b/util/generic/benchmark/fastclp2/main.cpp
@@ -1,50 +1,50 @@
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/generic/bitops.h>
-#include <util/generic/vector.h>
-#include <util/generic/xrange.h>
-#include <util/generic/singleton.h>
-
-#include <util/random/fast.h>
-
-namespace {
- template <typename T, size_t N>
- struct TExamplesHolder {
- TExamplesHolder()
+
+#include <util/generic/bitops.h>
+#include <util/generic/vector.h>
+#include <util/generic/xrange.h>
+#include <util/generic/singleton.h>
+
+#include <util/random/fast.h>
+
+namespace {
+ template <typename T, size_t N>
+ struct TExamplesHolder {
+ TExamplesHolder()
: Examples(N)
{
- TFastRng<ui64> prng{42u * sizeof(T) * N};
- for (auto& x : Examples) {
- x = prng();
- }
- }
-
+ TFastRng<ui64> prng{42u * sizeof(T) * N};
+ for (auto& x : Examples) {
+ x = prng();
+ }
+ }
+
TVector<T> Examples;
- };
-}
-
+ };
+}
+
#define DEFINE_BENCHMARK(type, count) \
- Y_CPU_BENCHMARK(FastClp2_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(FastClp2(e)); \
- } \
- } \
- }
-
-DEFINE_BENCHMARK(ui8, 1)
-DEFINE_BENCHMARK(ui8, 10)
-DEFINE_BENCHMARK(ui8, 100)
-DEFINE_BENCHMARK(ui16, 1)
-DEFINE_BENCHMARK(ui16, 10)
-DEFINE_BENCHMARK(ui16, 100)
-DEFINE_BENCHMARK(ui32, 1)
-DEFINE_BENCHMARK(ui32, 10)
-DEFINE_BENCHMARK(ui32, 100)
-DEFINE_BENCHMARK(ui64, 1)
-DEFINE_BENCHMARK(ui64, 10)
-DEFINE_BENCHMARK(ui64, 100)
-
-#undef DEFINE_BENCHMARKS
+ Y_CPU_BENCHMARK(FastClp2_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(FastClp2(e)); \
+ } \
+ } \
+ }
+
+DEFINE_BENCHMARK(ui8, 1)
+DEFINE_BENCHMARK(ui8, 10)
+DEFINE_BENCHMARK(ui8, 100)
+DEFINE_BENCHMARK(ui16, 1)
+DEFINE_BENCHMARK(ui16, 10)
+DEFINE_BENCHMARK(ui16, 100)
+DEFINE_BENCHMARK(ui32, 1)
+DEFINE_BENCHMARK(ui32, 10)
+DEFINE_BENCHMARK(ui32, 100)
+DEFINE_BENCHMARK(ui64, 1)
+DEFINE_BENCHMARK(ui64, 10)
+DEFINE_BENCHMARK(ui64, 100)
+
+#undef DEFINE_BENCHMARKS
diff --git a/util/generic/benchmark/fastclp2/metrics/main.py b/util/generic/benchmark/fastclp2/metrics/main.py
index 4baa3fe2564..5573c6a5d7f 100644
--- a/util/generic/benchmark/fastclp2/metrics/main.py
+++ b/util/generic/benchmark/fastclp2/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
metrics.set_benchmark(yc.execute_benchmark('util/generic/benchmark/fastclp2/fastclp2', threads=8))
diff --git a/util/generic/benchmark/fastclp2/metrics/ya.make b/util/generic/benchmark/fastclp2/metrics/ya.make
index 9411e3d5d54..b2d17ebad34 100644
--- a/util/generic/benchmark/fastclp2/metrics/ya.make
+++ b/util/generic/benchmark/fastclp2/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/generic/benchmark/fastclp2)
-
-END()
+
+END()
diff --git a/util/generic/benchmark/fastclp2/ya.make b/util/generic/benchmark/fastclp2/ya.make
index a475d0c67fe..976977014f6 100644
--- a/util/generic/benchmark/fastclp2/ya.make
+++ b/util/generic/benchmark/fastclp2/ya.make
@@ -1,13 +1,13 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
Y_BENCHMARK()
-
-SRCS(
- main.cpp
-)
-
-END()
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/generic/benchmark/log2/main.cpp b/util/generic/benchmark/log2/main.cpp
index a5490aba674..969f09a3090 100644
--- a/util/generic/benchmark/log2/main.cpp
+++ b/util/generic/benchmark/log2/main.cpp
@@ -1,30 +1,30 @@
#include <library/cpp/testing/benchmark/bench.h>
-
+
#include <library/cpp/fast_log/fast_log.h>
-
-#include <util/generic/singleton.h>
-#include <util/generic/vector.h>
-#include <util/random/fast.h>
-#include <util/generic/xrange.h>
-
-#include <cmath>
-namespace {
- template <typename T, size_t N>
- struct TExamplesHolder {
+
+#include <util/generic/singleton.h>
+#include <util/generic/vector.h>
+#include <util/random/fast.h>
+#include <util/generic/xrange.h>
+
+#include <cmath>
+namespace {
+ template <typename T, size_t N>
+ struct TExamplesHolder {
TVector<T> Examples;
-
- TExamplesHolder()
+
+ TExamplesHolder()
: Examples(N)
{
- TFastRng<ui64> prng{N * 42};
- for (auto& x : Examples) {
- x = prng.GenRandReal4() + prng.Uniform(1932); // 1934 is just a random number
- }
- }
- };
-}
-
-#define DEFINE_BENCHMARK(type, count) \
+ TFastRng<ui64> prng{N * 42};
+ for (auto& x : Examples) {
+ x = prng.GenRandReal4() + prng.Uniform(1932); // 1934 is just a random number
+ }
+ }
+ };
+}
+
+#define DEFINE_BENCHMARK(type, count) \
Y_CPU_BENCHMARK(libm_log2f_##type##_##count, iface) { \
const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
for (const auto i : xrange(iface.Iterations())) { \
@@ -44,64 +44,64 @@ namespace {
} \
} \
} \
- Y_CPU_BENCHMARK(STL_Log2_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(std::log2(e)); \
- } \
- } \
- } \
- \
- Y_CPU_BENCHMARK(STL_Log_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(std::log(e)); \
- } \
- } \
- } \
- \
- Y_CPU_BENCHMARK(Fast_Log2_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(FastLog2f(e)); \
- } \
- } \
- } \
- \
+ Y_CPU_BENCHMARK(STL_Log2_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(std::log2(e)); \
+ } \
+ } \
+ } \
+ \
+ Y_CPU_BENCHMARK(STL_Log_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(std::log(e)); \
+ } \
+ } \
+ } \
+ \
+ Y_CPU_BENCHMARK(Fast_Log2_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(FastLog2f(e)); \
+ } \
+ } \
+ } \
+ \
Y_CPU_BENCHMARK(FastLogf##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(FastLogf(e)); \
- } \
- } \
- } \
- \
- Y_CPU_BENCHMARK(Faster_Log2_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(FastLogf(e)); \
+ } \
+ } \
+ } \
+ \
+ Y_CPU_BENCHMARK(Faster_Log2_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
Y_DO_NOT_OPTIMIZE_AWAY(FasterLog2f(e)); \
- } \
- } \
- } \
- \
- Y_CPU_BENCHMARK(Faster_Log_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
+ } \
+ } \
+ } \
+ \
+ Y_CPU_BENCHMARK(Faster_Log_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
Y_DO_NOT_OPTIMIZE_AWAY(FasterLogf(e)); \
- } \
- } \
+ } \
+ } \
} \
\
Y_CPU_BENCHMARK(Fastest_Log2f_##type##_##count, iface) { \
@@ -122,19 +122,19 @@ namespace {
Y_DO_NOT_OPTIMIZE_AWAY(FastestLogf(e)); \
} \
} \
- }
-
-DEFINE_BENCHMARK(float, 1)
-DEFINE_BENCHMARK(float, 2)
-DEFINE_BENCHMARK(float, 4)
-DEFINE_BENCHMARK(float, 8)
-DEFINE_BENCHMARK(float, 16)
-DEFINE_BENCHMARK(float, 32)
-DEFINE_BENCHMARK(float, 64)
-DEFINE_BENCHMARK(float, 128)
-DEFINE_BENCHMARK(float, 256)
-DEFINE_BENCHMARK(float, 1024)
-DEFINE_BENCHMARK(float, 2048)
-DEFINE_BENCHMARK(float, 4096)
-
-#undef DEFINE_BENCHMARK
+ }
+
+DEFINE_BENCHMARK(float, 1)
+DEFINE_BENCHMARK(float, 2)
+DEFINE_BENCHMARK(float, 4)
+DEFINE_BENCHMARK(float, 8)
+DEFINE_BENCHMARK(float, 16)
+DEFINE_BENCHMARK(float, 32)
+DEFINE_BENCHMARK(float, 64)
+DEFINE_BENCHMARK(float, 128)
+DEFINE_BENCHMARK(float, 256)
+DEFINE_BENCHMARK(float, 1024)
+DEFINE_BENCHMARK(float, 2048)
+DEFINE_BENCHMARK(float, 4096)
+
+#undef DEFINE_BENCHMARK
diff --git a/util/generic/benchmark/log2/metrics/main.py b/util/generic/benchmark/log2/metrics/main.py
index 873f17664cf..26f6b57812b 100644
--- a/util/generic/benchmark/log2/metrics/main.py
+++ b/util/generic/benchmark/log2/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
metrics.set_benchmark(yc.execute_benchmark('util/generic/benchmark/log2/log2', threads=8))
diff --git a/util/generic/benchmark/log2/metrics/ya.make b/util/generic/benchmark/log2/metrics/ya.make
index 5afd7de2003..eb987e38d25 100644
--- a/util/generic/benchmark/log2/metrics/ya.make
+++ b/util/generic/benchmark/log2/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/generic/benchmark/log2)
-
-END()
+
+END()
diff --git a/util/generic/benchmark/log2/ya.make b/util/generic/benchmark/log2/ya.make
index eeef80523ba..45d751909ea 100644
--- a/util/generic/benchmark/log2/ya.make
+++ b/util/generic/benchmark/log2/ya.make
@@ -1,17 +1,17 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
Y_BENCHMARK()
-
-SRCS(
- main.cpp
-)
-
-PEERDIR(
+
+SRCS(
+ main.cpp
+)
+
+PEERDIR(
library/cpp/fast_log
-)
-
-END()
+)
+
+END()
diff --git a/util/generic/benchmark/rotate_bits/main.cpp b/util/generic/benchmark/rotate_bits/main.cpp
index 929d2c4ca92..057edbe864f 100644
--- a/util/generic/benchmark/rotate_bits/main.cpp
+++ b/util/generic/benchmark/rotate_bits/main.cpp
@@ -1,66 +1,66 @@
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/generic/vector.h>
-#include <util/generic/xrange.h>
-#include <util/generic/singleton.h>
-
-#include <util/random/fast.h>
-
-namespace {
- template <typename T>
- struct TExample {
- T Value;
- ui8 Shift;
- };
-
- template <typename T, size_t N>
- struct TExamplesHolder {
- TExamplesHolder()
+
+#include <util/generic/vector.h>
+#include <util/generic/xrange.h>
+#include <util/generic/singleton.h>
+
+#include <util/random/fast.h>
+
+namespace {
+ template <typename T>
+ struct TExample {
+ T Value;
+ ui8 Shift;
+ };
+
+ template <typename T, size_t N>
+ struct TExamplesHolder {
+ TExamplesHolder()
: Examples(N)
{
- TFastRng<ui64> prng{42u * sizeof(T) * N};
- for (auto& e : Examples) {
- e.Value = prng();
- e.Shift = prng() % (8 * sizeof(T));
- }
- }
-
+ TFastRng<ui64> prng{42u * sizeof(T) * N};
+ for (auto& e : Examples) {
+ e.Value = prng();
+ e.Shift = prng() % (8 * sizeof(T));
+ }
+ }
+
TVector<TExample<T>> Examples;
- };
-}
-
-#define DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(type, count) \
- Y_CPU_BENCHMARK(LeftRotate_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(RotateBitsLeft(e.Value, e.Shift)); \
- } \
- } \
- } \
- \
- Y_CPU_BENCHMARK(RightRotate_##type##_##count, iface) { \
- const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
- for (const auto i : xrange(iface.Iterations())) { \
- Y_UNUSED(i); \
- for (const auto e : examples) { \
- Y_DO_NOT_OPTIMIZE_AWAY(RotateBitsRight(e.Value, e.Shift)); \
- } \
- } \
- }
-
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 1)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 10)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 100)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 1)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 10)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 100)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 1)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 10)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 100)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 1)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 10)
-DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 100)
-
-#undef DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES
+ };
+}
+
+#define DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(type, count) \
+ Y_CPU_BENCHMARK(LeftRotate_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(RotateBitsLeft(e.Value, e.Shift)); \
+ } \
+ } \
+ } \
+ \
+ Y_CPU_BENCHMARK(RightRotate_##type##_##count, iface) { \
+ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \
+ for (const auto i : xrange(iface.Iterations())) { \
+ Y_UNUSED(i); \
+ for (const auto e : examples) { \
+ Y_DO_NOT_OPTIMIZE_AWAY(RotateBitsRight(e.Value, e.Shift)); \
+ } \
+ } \
+ }
+
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 1)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 10)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui8, 100)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 1)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 10)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui16, 100)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 1)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 10)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui32, 100)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 1)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 10)
+DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES(ui64, 100)
+
+#undef DEFINE_BENCHMARKS_FOR_UNSIGNED_TYPES
diff --git a/util/generic/benchmark/rotate_bits/metrics/main.py b/util/generic/benchmark/rotate_bits/metrics/main.py
index d752885779b..b30555775f9 100644
--- a/util/generic/benchmark/rotate_bits/metrics/main.py
+++ b/util/generic/benchmark/rotate_bits/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
metrics.set_benchmark(yc.execute_benchmark('util/generic/benchmark/rotate_bits/rotate_bits', threads=8))
diff --git a/util/generic/benchmark/rotate_bits/metrics/ya.make b/util/generic/benchmark/rotate_bits/metrics/ya.make
index 3bef9fae8a3..ac27d2f845f 100644
--- a/util/generic/benchmark/rotate_bits/metrics/ya.make
+++ b/util/generic/benchmark/rotate_bits/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/generic/benchmark/rotate_bits)
-
-END()
+
+END()
diff --git a/util/generic/benchmark/rotate_bits/ya.make b/util/generic/benchmark/rotate_bits/ya.make
index a475d0c67fe..976977014f6 100644
--- a/util/generic/benchmark/rotate_bits/ya.make
+++ b/util/generic/benchmark/rotate_bits/ya.make
@@ -1,13 +1,13 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
Y_BENCHMARK()
-
-SRCS(
- main.cpp
-)
-
-END()
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/generic/benchmark/vector_count_ctor/f.cpp b/util/generic/benchmark/vector_count_ctor/f.cpp
index e5d0a2ba25e..b89e351ba72 100644
--- a/util/generic/benchmark/vector_count_ctor/f.cpp
+++ b/util/generic/benchmark/vector_count_ctor/f.cpp
@@ -1,25 +1,25 @@
-#include "f.h"
-
+#include "f.h"
+
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/generic/vector.h>
-#include <util/generic/ptr.h>
-
-void CreateYvector(const size_t size, const size_t count) {
- for (size_t i = 0; i < count; ++i) {
- NBench::Clobber();
+
+#include <util/generic/vector.h>
+#include <util/generic/ptr.h>
+
+void CreateYvector(const size_t size, const size_t count) {
+ for (size_t i = 0; i < count; ++i) {
+ NBench::Clobber();
TVector<ui8> v(size);
- NBench::Escape(v.data());
- NBench::Clobber();
- }
-}
-
-void CreateCarray(const size_t size, const size_t count) {
- for (size_t i = 0; i < count; ++i) {
- NBench::Clobber();
- TArrayHolder<ui8> v(new ui8[size]);
- memset(v.Get(), 0, size * sizeof(ui8));
- NBench::Escape(v.Get());
- NBench::Clobber();
- }
-}
+ NBench::Escape(v.data());
+ NBench::Clobber();
+ }
+}
+
+void CreateCarray(const size_t size, const size_t count) {
+ for (size_t i = 0; i < count; ++i) {
+ NBench::Clobber();
+ TArrayHolder<ui8> v(new ui8[size]);
+ memset(v.Get(), 0, size * sizeof(ui8));
+ NBench::Escape(v.Get());
+ NBench::Clobber();
+ }
+}
diff --git a/util/generic/benchmark/vector_count_ctor/f.h b/util/generic/benchmark/vector_count_ctor/f.h
index c0b9e488032..a568341a456 100644
--- a/util/generic/benchmark/vector_count_ctor/f.h
+++ b/util/generic/benchmark/vector_count_ctor/f.h
@@ -1,9 +1,9 @@
-#pragma once
-
-#include <cstddef>
-
-// functions are declared in a separate translation unit so that compiler won't be able to see the
-// value of `size` during compilation.
-
-void CreateYvector(const size_t size, const size_t count);
-void CreateCarray(const size_t size, const size_t count);
+#pragma once
+
+#include <cstddef>
+
+// functions are declared in a separate translation unit so that compiler won't be able to see the
+// value of `size` during compilation.
+
+void CreateYvector(const size_t size, const size_t count);
+void CreateCarray(const size_t size, const size_t count);
diff --git a/util/generic/benchmark/vector_count_ctor/main.cpp b/util/generic/benchmark/vector_count_ctor/main.cpp
index 715186b40a1..6fb1fda9c94 100644
--- a/util/generic/benchmark/vector_count_ctor/main.cpp
+++ b/util/generic/benchmark/vector_count_ctor/main.cpp
@@ -1,30 +1,30 @@
-#include "f.h"
-
+#include "f.h"
+
#include <library/cpp/testing/benchmark/bench.h>
-
-#define DEFINE_BENCHMARK(N) \
- Y_CPU_BENCHMARK(Yvector_##N, iface) { \
- CreateYvector(N, iface.Iterations()); \
- } \
- Y_CPU_BENCHMARK(Carray_##N, iface) { \
- CreateCarray(N, iface.Iterations()); \
- }
-
-DEFINE_BENCHMARK(1)
-DEFINE_BENCHMARK(2)
-DEFINE_BENCHMARK(8)
-DEFINE_BENCHMARK(10)
-DEFINE_BENCHMARK(16)
-DEFINE_BENCHMARK(20)
-DEFINE_BENCHMARK(1000)
-DEFINE_BENCHMARK(1024)
-DEFINE_BENCHMARK(8192)
-DEFINE_BENCHMARK(10000)
-DEFINE_BENCHMARK(65536)
-DEFINE_BENCHMARK(100000)
-DEFINE_BENCHMARK(4194304)
-DEFINE_BENCHMARK(1000000)
-DEFINE_BENCHMARK(33554432)
-DEFINE_BENCHMARK(10000000)
-DEFINE_BENCHMARK(268435456)
-DEFINE_BENCHMARK(100000000)
+
+#define DEFINE_BENCHMARK(N) \
+ Y_CPU_BENCHMARK(Yvector_##N, iface) { \
+ CreateYvector(N, iface.Iterations()); \
+ } \
+ Y_CPU_BENCHMARK(Carray_##N, iface) { \
+ CreateCarray(N, iface.Iterations()); \
+ }
+
+DEFINE_BENCHMARK(1)
+DEFINE_BENCHMARK(2)
+DEFINE_BENCHMARK(8)
+DEFINE_BENCHMARK(10)
+DEFINE_BENCHMARK(16)
+DEFINE_BENCHMARK(20)
+DEFINE_BENCHMARK(1000)
+DEFINE_BENCHMARK(1024)
+DEFINE_BENCHMARK(8192)
+DEFINE_BENCHMARK(10000)
+DEFINE_BENCHMARK(65536)
+DEFINE_BENCHMARK(100000)
+DEFINE_BENCHMARK(4194304)
+DEFINE_BENCHMARK(1000000)
+DEFINE_BENCHMARK(33554432)
+DEFINE_BENCHMARK(10000000)
+DEFINE_BENCHMARK(268435456)
+DEFINE_BENCHMARK(100000000)
diff --git a/util/generic/benchmark/vector_count_ctor/metrics/main.py b/util/generic/benchmark/vector_count_ctor/metrics/main.py
index f2602ed3ffa..835b44fe5f7 100644
--- a/util/generic/benchmark/vector_count_ctor/metrics/main.py
+++ b/util/generic/benchmark/vector_count_ctor/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
metrics.set_benchmark(yc.execute_benchmark('util/generic/benchmark/vector_count_ctor/vector_count_ctor', threads=8))
diff --git a/util/generic/benchmark/vector_count_ctor/metrics/ya.make b/util/generic/benchmark/vector_count_ctor/metrics/ya.make
index 1441bcbf3a9..c48f89b564a 100644
--- a/util/generic/benchmark/vector_count_ctor/metrics/ya.make
+++ b/util/generic/benchmark/vector_count_ctor/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- yazevnul
+OWNER(
+ yazevnul
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/generic/benchmark/vector_count_ctor)
-
-END()
+
+END()
diff --git a/util/generic/benchmark/vector_count_ctor/ya.make b/util/generic/benchmark/vector_count_ctor/ya.make
index 735d8cf3971..42ce4428194 100644
--- a/util/generic/benchmark/vector_count_ctor/ya.make
+++ b/util/generic/benchmark/vector_count_ctor/ya.make
@@ -1,16 +1,16 @@
-OWNER(
- yazevnul
- g:util
-)
+OWNER(
+ yazevnul
+ g:util
+)
SUBSCRIBER(g:util-subscribers)
-
+
Y_BENCHMARK()
-
-ALLOCATOR(B)
-
-SRCS(
- main.cpp
- f.cpp
-)
-
-END()
+
+ALLOCATOR(B)
+
+SRCS(
+ main.cpp
+ f.cpp
+)
+
+END()
diff --git a/util/generic/benchmark/ya.make b/util/generic/benchmark/ya.make
index 9c18713826f..635860a646c 100644
--- a/util/generic/benchmark/ya.make
+++ b/util/generic/benchmark/ya.make
@@ -1,19 +1,19 @@
OWNER(yazevnul g:util)
SUBSCRIBER(g:util-subscribers)
-
-RECURSE(
- fastclp2
- fastclp2/metrics
- log2
- log2/metrics
- rotate_bits
- rotate_bits/metrics
- singleton
+
+RECURSE(
+ fastclp2
+ fastclp2/metrics
+ log2
+ log2/metrics
+ rotate_bits
+ rotate_bits/metrics
+ singleton
smart_pointers
sort
string
- vector_count_ctor
+ vector_count_ctor
vector_count_ctor/metrics
cont_speed
-)
+)