diff options
author | Vitaly Goldshteyn <goldvitaly@google.com> | 2024-03-03 09:17:56 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-03-03 09:19:07 -0800 |
commit | 7a4344511816e82234700795e7f2aaa80e85a119 (patch) | |
tree | 47f87932a009101e96f120905f0f520009d0315c /absl/container | |
parent | e7fe9ec9ebfc6607765d489b76c9954e0a88c5d4 (diff) |
Create `BM_GroupPortable_Match`.
PiperOrigin-RevId: 612201313
Change-Id: Ia9e7f146f5e1ecaffcb15de694049b716db38d02
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/internal/raw_hash_set_benchmark.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/absl/container/internal/raw_hash_set_benchmark.cc b/absl/container/internal/raw_hash_set_benchmark.cc index 8cd43fb5..0fa9c712 100644 --- a/absl/container/internal/raw_hash_set_benchmark.cc +++ b/absl/container/internal/raw_hash_set_benchmark.cc @@ -457,6 +457,19 @@ void BM_Group_Match(benchmark::State& state) { } BENCHMARK(BM_Group_Match); +void BM_GroupPortable_Match(benchmark::State& state) { + std::array<ctrl_t, GroupPortableImpl::kWidth> group; + Iota(group.begin(), group.end(), -4); + GroupPortableImpl g{group.data()}; + h2_t h = 1; + for (auto _ : state) { + ::benchmark::DoNotOptimize(h); + ::benchmark::DoNotOptimize(g); + ::benchmark::DoNotOptimize(g.Match(h)); + } +} +BENCHMARK(BM_GroupPortable_Match); + void BM_Group_MaskEmpty(benchmark::State& state) { std::array<ctrl_t, Group::kWidth> group; Iota(group.begin(), group.end(), -4); |