MCPcopy Create free account
hub / github.com/apache/arrow / Expand

Function Expand

cpp/src/arrow/util/trie_benchmark.cc:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46std::vector<std::string> Expand(const std::vector<std::string>& base, size_t n) {
47 std::vector<std::string> result;
48 result.reserve(n);
49
50 while (true) {
51 for (const auto& v : base) {
52 result.push_back(v);
53 if (result.size() == n) {
54 return result;
55 }
56 }
57 }
58}
59
60static void BenchmarkTrieLookups(benchmark::State& state, // NOLINT non-const reference
61 const std::vector<std::string>& strings) {

Callers 2

BenchmarkTrieLookupsFunction · 0.85

Calls 3

push_backMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected