aboutsummaryrefslogtreecommitdiffstats
path: root/util/charset/benchmark/to_lower/main.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/charset/benchmark/to_lower/main.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/charset/benchmark/to_lower/main.cpp')
-rw-r--r--util/charset/benchmark/to_lower/main.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/util/charset/benchmark/to_lower/main.cpp b/util/charset/benchmark/to_lower/main.cpp
index e95fdc2371..30260e532d 100644
--- a/util/charset/benchmark/to_lower/main.cpp
+++ b/util/charset/benchmark/to_lower/main.cpp
@@ -1,25 +1,25 @@
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/charset/wide.h>
-#include <util/generic/singleton.h>
-#include <util/generic/vector.h>
-#include <util/generic/string.h>
-
-static const auto ShortAscii = UTF8ToWide("hELlo");
-static const auto LongAscii = UTF8ToWide(
- "The first plane, plane 0, the Basic Multilingual Plane (BMP) contains characters for almost "
- "all modern languages, and a large number of symbols. A primary objective for the BMP is to "
- "support the unification of prior character sets as well as characters for writing. Most of "
- "the assigned code points in the BMP are used to encode Chinese, Japanese, and Korean (CJK) "
- "characters.");
-
-static const auto ShortRussian = UTF8ToWide("пРИвет");
-static const auto LongRussian = UTF8ToWide(
- "Плоскость 0 (Основная многоязычная плоскость, англ. Basic Multilingual Plane, BMP) отведена "
- "для символов практически всех современных письменностей и большого числа специальных символов. "
- "Большая часть таблицы занята китайско-японскими иероглифами и своеобразными корейскими"
- "буквами. В Юникоде 10.0 в этой плоскости представлены следующие блоки");
-
+
+#include <util/charset/wide.h>
+#include <util/generic/singleton.h>
+#include <util/generic/vector.h>
+#include <util/generic/string.h>
+
+static const auto ShortAscii = UTF8ToWide("hELlo");
+static const auto LongAscii = UTF8ToWide(
+ "The first plane, plane 0, the Basic Multilingual Plane (BMP) contains characters for almost "
+ "all modern languages, and a large number of symbols. A primary objective for the BMP is to "
+ "support the unification of prior character sets as well as characters for writing. Most of "
+ "the assigned code points in the BMP are used to encode Chinese, Japanese, and Korean (CJK) "
+ "characters.");
+
+static const auto ShortRussian = UTF8ToWide("пРИвет");
+static const auto LongRussian = UTF8ToWide(
+ "Плоскость 0 (Основная многоязычная плоскость, англ. Basic Multilingual Plane, BMP) отведена "
+ "для символов практически всех современных письменностей и большого числа специальных символов. "
+ "Большая часть таблицы занята китайско-японскими иероглифами и своеобразными корейскими"
+ "буквами. В Юникоде 10.0 в этой плоскости представлены следующие блоки");
+
#define DEFINE_INPLACE_BENCH(s) \
Y_CPU_BENCHMARK(s##CopyDetach, iface) { \
for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { \
@@ -38,8 +38,8 @@ static const auto LongRussian = UTF8ToWide(
NBench::Escape(copy.data()); \
NBench::Clobber(); \
} \
- }
-
+ }
+
#define DEFINE_RET_BENCH(s) \
Y_CPU_BENCHMARK(s##Ret, iface) { \
for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { \
@@ -48,14 +48,14 @@ static const auto LongRussian = UTF8ToWide(
NBench::Escape(res.data()); \
NBench::Clobber(); \
} \
- }
-
-DEFINE_INPLACE_BENCH(ShortAscii)
-DEFINE_INPLACE_BENCH(LongAscii)
-DEFINE_INPLACE_BENCH(ShortRussian)
-DEFINE_INPLACE_BENCH(LongRussian)
-
-DEFINE_RET_BENCH(ShortAscii)
-DEFINE_RET_BENCH(LongAscii)
-DEFINE_RET_BENCH(ShortRussian)
-DEFINE_RET_BENCH(LongRussian)
+ }
+
+DEFINE_INPLACE_BENCH(ShortAscii)
+DEFINE_INPLACE_BENCH(LongAscii)
+DEFINE_INPLACE_BENCH(ShortRussian)
+DEFINE_INPLACE_BENCH(LongRussian)
+
+DEFINE_RET_BENCH(ShortAscii)
+DEFINE_RET_BENCH(LongAscii)
+DEFINE_RET_BENCH(ShortRussian)
+DEFINE_RET_BENCH(LongRussian)