| 105 | BENCHMARK(QueryFlatMap)->DenseRange(8, 128, 8); |
| 106 | |
| 107 | static void IterateUnorderedMap(benchmark::State& state) { |
| 108 | StringCache stringCache; |
| 109 | auto cachedStrings = makeRandomInternedStrings(stringCache, state.range(0), 10); |
| 110 | |
| 111 | std::unordered_map<StringBox, bool> map; |
| 112 | |
| 113 | for (const auto& str : cachedStrings) { |
| 114 | map[str] = true; |
| 115 | } |
| 116 | |
| 117 | for (auto _ : state) { |
| 118 | for ([[maybe_unused]] const auto& it : map) { |
| 119 | benchmark::DoNotOptimize(it); |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | BENCHMARK(IterateUnorderedMap)->DenseRange(8, 128, 8); |
| 124 | |
| 125 | static void IterateFlatMap(benchmark::State& state) { |
nothing calls this directly
no test coverage detected