| 21 | BENCHMARK(CreateUnorderedMap)->DenseRange(8, 128, 8); |
| 22 | |
| 23 | static void CreateFlatMap(benchmark::State& state) { |
| 24 | StringCache stringCache; |
| 25 | auto cachedStrings = makeRandomInternedStrings(stringCache, state.range(0), 10); |
| 26 | |
| 27 | for (auto _ : state) { |
| 28 | Valdi::FlatMap<StringBox, bool> map; |
| 29 | |
| 30 | for (const auto& str : cachedStrings) { |
| 31 | map[str] = true; |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | BENCHMARK(CreateFlatMap)->DenseRange(8, 128, 8); |
| 36 | |
| 37 | static void CreateUnorderedMapWithReserve(benchmark::State& state) { |
nothing calls this directly
no test coverage detected