MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / parse_stl

Function parse_stl

less_slow.cpp:4380–4392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4378}
4379
4380void parse_stl(bm::State &state, std::string_view config_text) {
4381 std::size_t pairs = 0, bytes = 0;
4382 std::vector<std::pair<std::string, std::string>> settings;
4383 for (auto _ : state) {
4384 settings.clear();
4385 config_parse_stl(config_text, settings);
4386 bm::DoNotOptimize(settings);
4387 pairs += settings.size();
4388 bytes += config_text.size();
4389 }
4390 state.SetBytesProcessed(bytes);
4391 state.counters["pairs/s"] = bm::Counter(pairs, bm::Counter::kIsRate);
4392}
4393
4394/**
4395 * The STL's `std::ranges::views::split` won't compile with a predicate lambda,

Callers

nothing calls this directly

Calls 2

config_parse_stlFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected