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

Function CopyShortVector

cpp/src/arrow/util/small_vector_benchmark.cc:128–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127template <typename Vector>
128void CopyShortVector(benchmark::State& state) {
129 constexpr int kSize = 3;
130 constexpr int kNumIters = 1000;
131
132 const Vector vec(kSize);
133
134 for (auto _ : state) {
135 int64_t dummy = 0;
136 for (int i = 0; i < kNumIters; ++i) {
137 dummy += ConsumeVector(vec);
138 }
139 benchmark::DoNotOptimize(dummy);
140 }
141
142 state.SetItemsProcessed(state.iterations() * kNumIters);
143}
144
145// With ARROW_NOINLINE, try to make sure the number of items is not constant-propagated
146template <typename Vector>

Callers

nothing calls this directly

Calls 1

ConsumeVectorFunction · 0.85

Tested by

no test coverage detected