| 123 | BENCHMARK(IterateUnorderedMap)->DenseRange(8, 128, 8); |
| 124 | |
| 125 | static void IterateFlatMap(benchmark::State& state) { |
| 126 | StringCache stringCache; |
| 127 | auto cachedStrings = makeRandomInternedStrings(stringCache, state.range(0), 10); |
| 128 | |
| 129 | Valdi::FlatMap<StringBox, bool> map; |
| 130 | |
| 131 | for (const auto& str : cachedStrings) { |
| 132 | map[str] = true; |
| 133 | } |
| 134 | |
| 135 | for (auto _ : state) { |
| 136 | for ([[maybe_unused]] const auto& it : map) { |
| 137 | benchmark::DoNotOptimize(it); |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | BENCHMARK(IterateFlatMap)->DenseRange(8, 128, 8); |
| 142 | |
| 143 | BENCHMARK_MAIN(); |
nothing calls this directly
no test coverage detected