| 189 | } |
| 190 | |
| 191 | static void BenchmarkInlinedTrieLookups( |
| 192 | benchmark::State& state, // NOLINT non-const reference |
| 193 | const std::vector<std::string>& strings) { |
| 194 | int32_t total = 0; |
| 195 | |
| 196 | auto lookups = Expand(strings, 100); |
| 197 | |
| 198 | for (auto _ : state) { |
| 199 | for (const auto& s : lookups) { |
| 200 | total += InlinedNullLookup(s); |
| 201 | } |
| 202 | } |
| 203 | benchmark::DoNotOptimize(total); |
| 204 | state.SetItemsProcessed(state.iterations() * lookups.size()); |
| 205 | } |
| 206 | static void InlinedTrieLookupFound( |
| 207 | benchmark::State& state) { // NOLINT non-const reference |
| 208 | BenchmarkInlinedTrieLookups(state, {"N/A", "null", "-1.#IND", "N/A"}); |
no test coverage detected