Skip to content

Commit 8c890fb

Browse files
committed
A few more fields to make effect more pronounced
1 parent 81c9be2 commit 8c890fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cpp/src/arrow/compute/function_benchmark.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "arrow/array/array_base.h"
2121
#include "arrow/compute/api.h"
22+
#include "arrow/compute/exec_internal.h"
2223
#include "arrow/memory_pool.h"
2324
#include "arrow/scalar.h"
2425
#include "arrow/testing/gtest_util.h"
@@ -179,16 +180,17 @@ void BM_ExecBatchIterator(benchmark::State& state) {
179180
random::RandomArrayGenerator rag(kSeed);
180181

181182
const int64_t length = 1 << 20;
182-
const int num_fields = 10;
183+
const int num_fields = 32;
183184

184185
std::vector<Datum> args(num_fields);
185186
for (int i = 0; i < num_fields; ++i) {
186187
args[i] = rag.Int64(length, 0, 100)->data();
187188
}
188189

190+
const int64_t blocksize = state.range(0);
189191
for (auto _ : state) {
190-
std::unique_ptr<ExecBatchIterator> it =
191-
*ExecBatchIterator::Make(args, state.range(0));
192+
std::unique_ptr<detail::ExecBatchIterator> it =
193+
*detail::ExecBatchIterator::Make(args, blocksize);
192194
ExecBatch batch;
193195
while (it->Next(&batch)) {
194196
for (int i = 0; i < num_fields; ++i) {

0 commit comments

Comments
 (0)