diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
commit | 49116032d905455a7b1c994e4a696afc885c1e71 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /util/digest/benchmark/murmur/main.cpp | |
parent | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff) | |
download | ydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/digest/benchmark/murmur/main.cpp')
-rw-r--r-- | util/digest/benchmark/murmur/main.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/util/digest/benchmark/murmur/main.cpp b/util/digest/benchmark/murmur/main.cpp index 49f5d891f4..1fe2fdcc21 100644 --- a/util/digest/benchmark/murmur/main.cpp +++ b/util/digest/benchmark/murmur/main.cpp @@ -1,27 +1,27 @@ -#include <contrib/libs/benchmark/include/benchmark/benchmark.h> - -#include <util/digest/murmur.h> -#include <util/system/types.h> - -#include <array> - -constexpr auto MakeTestData() { +#include <contrib/libs/benchmark/include/benchmark/benchmark.h> + +#include <util/digest/murmur.h> +#include <util/system/types.h> + +#include <array> + +constexpr auto MakeTestData() { std::array<ui64, 4096> result; for (ui64 i = 0; i < result.size(); ++i) { result[i] = i; } return result; -} - -constexpr auto TEST_DATA = MakeTestData(); - -template <typename Result> -static void BenchmarkMurmurHash(benchmark::State& state) { +} + +constexpr auto TEST_DATA = MakeTestData(); + +template <typename Result> +static void BenchmarkMurmurHash(benchmark::State& state) { for (auto _ : state) { - Result hash = MurmurHash<Result>(TEST_DATA.data(), sizeof(TEST_DATA)); - Y_DO_NOT_OPTIMIZE_AWAY(hash); + Result hash = MurmurHash<Result>(TEST_DATA.data(), sizeof(TEST_DATA)); + Y_DO_NOT_OPTIMIZE_AWAY(hash); } -} - -BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui32); -BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui64); +} + +BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui32); +BENCHMARK_TEMPLATE(BenchmarkMurmurHash, ui64); |