| 7 | using namespace Valdi; |
| 8 | |
| 9 | static void CreateUnorderedMap(benchmark::State& state) { |
| 10 | StringCache stringCache; |
| 11 | auto cachedStrings = makeRandomInternedStrings(stringCache, state.range(0), 10); |
| 12 | |
| 13 | for (auto _ : state) { |
| 14 | std::unordered_map<StringBox, bool> map; |
| 15 | |
| 16 | for (const auto& str : cachedStrings) { |
| 17 | map[str] = true; |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | BENCHMARK(CreateUnorderedMap)->DenseRange(8, 128, 8); |
| 22 | |
| 23 | static void CreateFlatMap(benchmark::State& state) { |
nothing calls this directly
no test coverage detected