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

Function SelectKBenchmark

cpp/src/arrow/compute/kernels/vector_topk_benchmark.cc:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31constexpr auto kSeed = 0x0ff1ce;
32
33static void SelectKBenchmark(benchmark::State& state,
34 const std::shared_ptr<Array>& values, int64_t k) {
35 for (auto _ : state) {
36 ABORT_NOT_OK(SelectKUnstable(*values, SelectKOptions::TopKDefault(k)));
37 }
38 state.SetItemsProcessed(state.iterations() * values->length());
39}
40
41static void SelectKInt64(benchmark::State& state) {
42 RegressionArgs args(state);

Callers 1

SelectKInt64Function · 0.85

Calls 2

TopKDefaultFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected