aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/benchmark
diff options
context:
space:
mode:
authorkhlebnikov <khlebnikov@yandex-team.ru>2022-02-10 16:50:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:08 +0300
commit6cffcf9a14a1dd07278bd534c7cca706ec2827b3 (patch)
tree48eb57e1d9fd00d624ca68bb3418c3c041d1b096 /util/string/benchmark
parent1977f1c7bcb225f59f789f5f8735e03eb0c87e1c (diff)
downloadydb-6cffcf9a14a1dd07278bd534c7cca706ec2827b3.tar.gz
Restoring authorship annotation for <khlebnikov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/benchmark')
-rw-r--r--util/string/benchmark/cast/main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/string/benchmark/cast/main.cpp b/util/string/benchmark/cast/main.cpp
index f604712ab6..986ef7ad38 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));
}
}