diff options
author | khlebnikov <khlebnikov@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
commit | df35d89845ad252e6db1c6adf84da9b15de0e3b3 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/string/benchmark | |
parent | 6cffcf9a14a1dd07278bd534c7cca706ec2827b3 (diff) | |
download | ydb-df35d89845ad252e6db1c6adf84da9b15de0e3b3.tar.gz |
Restoring authorship annotation for <khlebnikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/string/benchmark')
-rw-r--r-- | util/string/benchmark/cast/main.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/string/benchmark/cast/main.cpp b/util/string/benchmark/cast/main.cpp index 986ef7ad38..f604712ab6 100644 --- a/util/string/benchmark/cast/main.cpp +++ b/util/string/benchmark/cast/main.cpp @@ -3,36 +3,36 @@ #include <util/string/cast.h> #include <util/generic/xrange.h> -char str1[] = "1"; -char str12[] = "12"; -char str1234[] = "1234"; -char str12345678[] = "12345678"; - +char str1[] = "1"; +char str12[] = "12"; +char str1234[] = "1234"; +char str12345678[] = "12345678"; + Y_CPU_BENCHMARK(Parse_1, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str1, 1)); + Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str1, 1)); } } Y_CPU_BENCHMARK(Parse_12, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str12, 2)); + Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str12, 2)); } } Y_CPU_BENCHMARK(Parse_1234, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str1234, 4)); + Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str1234, 4)); } } Y_CPU_BENCHMARK(Parse_12345678, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str12345678, 8)); + Y_DO_NOT_OPTIMIZE_AWAY(FromString<ui32>(str12345678, 8)); } } @@ -40,27 +40,27 @@ Y_CPU_BENCHMARK(Parse_12345678, iface) { Y_CPU_BENCHMARK(Atoi_1, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(atoi(str1)); + Y_DO_NOT_OPTIMIZE_AWAY(atoi(str1)); } } Y_CPU_BENCHMARK(Atoi_12, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(atoi(str12)); + Y_DO_NOT_OPTIMIZE_AWAY(atoi(str12)); } } Y_CPU_BENCHMARK(Atoi_1234, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(atoi(str1234)); + Y_DO_NOT_OPTIMIZE_AWAY(atoi(str1234)); } } Y_CPU_BENCHMARK(Atoi_12345678, iface) { for (const auto i : xrange(iface.Iterations())) { Y_UNUSED(i); - Y_DO_NOT_OPTIMIZE_AWAY(atoi(str12345678)); + Y_DO_NOT_OPTIMIZE_AWAY(atoi(str12345678)); } } |