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

Function ReferenceBuildVectorNoNulls

cpp/src/arrow/builder_benchmark.cc:471–483  ·  view source on GitHub ↗

This benchmarks acts as a reference to the native std::vector implementation. It appends kRounds chunks into a vector.

Source from the content-addressed store, hash-verified

469// This benchmarks acts as a reference to the native std::vector
470// implementation. It appends kRounds chunks into a vector.
471static void ReferenceBuildVectorNoNulls(
472 benchmark::State& state) { // NOLINT non-const reference
473 for (auto _ : state) {
474 std::vector<int64_t> builder;
475
476 for (int i = 0; i < kRounds; i++) {
477 builder.insert(builder.end(), kData.cbegin(), kData.cend());
478 }
479 }
480
481 state.SetBytesProcessed(state.iterations() * kBytesProcessed);
482 state.SetItemsProcessed(state.iterations() * kItemsProcessed);
483}
484
485BENCHMARK(ReferenceBuildVectorNoNulls);
486

Callers

nothing calls this directly

Calls 4

cbeginMethod · 0.80
cendMethod · 0.80
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected