| 50 | BENCHMARK(CreateUnorderedMapWithReserve)->DenseRange(8, 128, 8); |
| 51 | |
| 52 | static void CreateFlatMapWithReserve(benchmark::State& state) { |
| 53 | StringCache stringCache; |
| 54 | auto cachedStrings = makeRandomInternedStrings(stringCache, state.range(0), 10); |
| 55 | |
| 56 | for (auto _ : state) { |
| 57 | Valdi::FlatMap<StringBox, bool> map; |
| 58 | map.reserve(cachedStrings.size()); |
| 59 | |
| 60 | for (const auto& str : cachedStrings) { |
| 61 | map[str] = true; |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | BENCHMARK(CreateFlatMapWithReserve)->DenseRange(8, 128, 8); |
| 66 | |
| 67 | static void QueryUnorderedMap(benchmark::State& state) { |
nothing calls this directly
no test coverage detected