aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/int128/bench
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/int128/bench
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/int128/bench')
-rw-r--r--library/cpp/int128/bench/main.cpp86
-rw-r--r--library/cpp/int128/bench/ya.make26
2 files changed, 56 insertions, 56 deletions
diff --git a/library/cpp/int128/bench/main.cpp b/library/cpp/int128/bench/main.cpp
index be4f8d1500..54d063cc40 100644
--- a/library/cpp/int128/bench/main.cpp
+++ b/library/cpp/int128/bench/main.cpp
@@ -1,45 +1,45 @@
#include <library/cpp/int128/int128.h>
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/generic/xrange.h>
-#include <util/system/compiler.h>
-
-Y_CPU_BENCHMARK(LibraryDivisionUnsigned128, iface) {
- ui128 b = {0, 10'000'000};
- for (const auto i : xrange(iface.Iterations())) {
- ui128 a = i * 10'000'000;
- ui128 c = a / b;
- Y_FAKE_READ(c);
- }
-}
-
-#if defined(Y_HAVE_INT128)
-Y_CPU_BENCHMARK(IntrinsicDivisionUnsigned128, iface) {
- unsigned __int128 b = 10'000'000;
- for (const auto i : xrange(iface.Iterations())) {
- unsigned __int128 a = i * 10'000'000;
- unsigned __int128 c = a / b;
- Y_FAKE_READ(c);
- }
-}
-#endif // Y_HAVE_INT128
-
-Y_CPU_BENCHMARK(LibraryDivisionSigned128, iface) {
- i128 b = {0, 10'000'000};
- for (const auto i : xrange(iface.Iterations())) {
- i128 a = i * 10'000'000;
- i128 c = a / b;
- Y_FAKE_READ(c);
- }
-}
-
-#if defined(Y_HAVE_INT128)
-Y_CPU_BENCHMARK(IntrinsicDivisionSigned128, iface) {
- signed __int128 b = 10'000'000;
- for (const auto i : xrange(iface.Iterations())) {
- signed __int128 a = i * 10'000'000;
- signed __int128 c = a / b;
- Y_FAKE_READ(c);
- }
-}
-#endif // Y_HAVE_INT128
+
+#include <util/generic/xrange.h>
+#include <util/system/compiler.h>
+
+Y_CPU_BENCHMARK(LibraryDivisionUnsigned128, iface) {
+ ui128 b = {0, 10'000'000};
+ for (const auto i : xrange(iface.Iterations())) {
+ ui128 a = i * 10'000'000;
+ ui128 c = a / b;
+ Y_FAKE_READ(c);
+ }
+}
+
+#if defined(Y_HAVE_INT128)
+Y_CPU_BENCHMARK(IntrinsicDivisionUnsigned128, iface) {
+ unsigned __int128 b = 10'000'000;
+ for (const auto i : xrange(iface.Iterations())) {
+ unsigned __int128 a = i * 10'000'000;
+ unsigned __int128 c = a / b;
+ Y_FAKE_READ(c);
+ }
+}
+#endif // Y_HAVE_INT128
+
+Y_CPU_BENCHMARK(LibraryDivisionSigned128, iface) {
+ i128 b = {0, 10'000'000};
+ for (const auto i : xrange(iface.Iterations())) {
+ i128 a = i * 10'000'000;
+ i128 c = a / b;
+ Y_FAKE_READ(c);
+ }
+}
+
+#if defined(Y_HAVE_INT128)
+Y_CPU_BENCHMARK(IntrinsicDivisionSigned128, iface) {
+ signed __int128 b = 10'000'000;
+ for (const auto i : xrange(iface.Iterations())) {
+ signed __int128 a = i * 10'000'000;
+ signed __int128 c = a / b;
+ Y_FAKE_READ(c);
+ }
+}
+#endif // Y_HAVE_INT128
diff --git a/library/cpp/int128/bench/ya.make b/library/cpp/int128/bench/ya.make
index 4800e7883d..bcd7c2a263 100644
--- a/library/cpp/int128/bench/ya.make
+++ b/library/cpp/int128/bench/ya.make
@@ -1,15 +1,15 @@
-OWNER(
- vladon
-)
-
+OWNER(
+ vladon
+)
+
Y_BENCHMARK()
-
-SRCS(
- main.cpp
-)
-
-PEERDIR(
+
+SRCS(
+ main.cpp
+)
+
+PEERDIR(
library/cpp/int128
-)
-
-END()
+)
+
+END()