diff options
author | cobat <cobat@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | e486e109b08823b61996f2154f0bc6b7c27a4af4 (patch) | |
tree | cb98553f871fe96452fd02bd46a1a4e0cf165844 /util/generic | |
parent | 85e7b8b43a12f69b4721aee71dea28491c9bd503 (diff) | |
download | ydb-e486e109b08823b61996f2154f0bc6b7c27a4af4.tar.gz |
Restoring authorship annotation for <cobat@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r-- | util/generic/benchmark/log2/main.cpp | 88 | ||||
-rw-r--r-- | util/generic/yexception_ut.cpp | 2 |
2 files changed, 45 insertions, 45 deletions
diff --git a/util/generic/benchmark/log2/main.cpp b/util/generic/benchmark/log2/main.cpp index 969f09a309..44db7bf4cf 100644 --- a/util/generic/benchmark/log2/main.cpp +++ b/util/generic/benchmark/log2/main.cpp @@ -14,8 +14,8 @@ namespace { TVector<T> Examples; TExamplesHolder() - : Examples(N) - { + : Examples(N) + { TFastRng<ui64> prng{N * 42}; for (auto& x : Examples) { x = prng.GenRandReal4() + prng.Uniform(1932); // 1934 is just a random number @@ -25,25 +25,25 @@ namespace { } #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())) { \ - Y_UNUSED(i); \ - for (const auto e : examples) { \ - Y_DO_NOT_OPTIMIZE_AWAY(log2f(e)); \ - } \ - } \ - } \ - \ - Y_CPU_BENCHMARK(libm_logf_##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(logf(e)); \ - } \ - } \ - } \ + Y_CPU_BENCHMARK(libm_log2f_##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(log2f(e)); \ + } \ + } \ + } \ + \ + Y_CPU_BENCHMARK(libm_logf_##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(logf(e)); \ + } \ + } \ + } \ Y_CPU_BENCHMARK(STL_Log2_##type##_##count, iface) { \ const auto& examples = Default<TExamplesHolder<type, count>>().Examples; \ for (const auto i : xrange(iface.Iterations())) { \ @@ -74,7 +74,7 @@ namespace { } \ } \ \ - Y_CPU_BENCHMARK(FastLogf##type##_##count, iface) { \ + 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); \ @@ -89,7 +89,7 @@ namespace { for (const auto i : xrange(iface.Iterations())) { \ Y_UNUSED(i); \ for (const auto e : examples) { \ - Y_DO_NOT_OPTIMIZE_AWAY(FasterLog2f(e)); \ + Y_DO_NOT_OPTIMIZE_AWAY(FasterLog2f(e)); \ } \ } \ } \ @@ -99,29 +99,29 @@ namespace { 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) { \ - 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(FastestLog2f(e)); \ - } \ - } \ - } \ - \ - Y_CPU_BENCHMARK(Fastest_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(FastestLogf(e)); \ + Y_DO_NOT_OPTIMIZE_AWAY(FasterLogf(e)); \ } \ } \ + } \ + \ + Y_CPU_BENCHMARK(Fastest_Log2f_##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(FastestLog2f(e)); \ + } \ + } \ + } \ + \ + Y_CPU_BENCHMARK(Fastest_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(FastestLogf(e)); \ + } \ + } \ } DEFINE_BENCHMARK(float, 1) diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp index cb3e29fed8..cf085f8fc9 100644 --- a/util/generic/yexception_ut.cpp +++ b/util/generic/yexception_ut.cpp @@ -59,7 +59,7 @@ private: inline void TestRethrowAppend() { try { try { - ythrow yexception() << "it"; + ythrow yexception() << "it"; } catch (yexception& e) { e << "happens"; |