bkietz commented on a change in pull request #9621: URL: https://github.com/apache/arrow/pull/9621#discussion_r599025873
########## File path: cpp/src/arrow/compute/kernels/aggregate_benchmark.cc ########## @@ -300,6 +300,57 @@ BENCHMARK_TEMPLATE(ReferenceSum, SumBitmapVectorizeUnroll<int64_t>) ->Apply(BenchmarkSetArgs); #endif // ARROW_WITH_BENCHMARKS_REFERENCE +// +// GroupBy +// + +static void BenchmarkGroupBy(benchmark::State& state, + std::vector<internal::Aggregate> aggregates, + std::vector<Datum> arguments, std::vector<Datum> keys) { + for (auto _ : state) { + ABORT_NOT_OK(GroupBy(arguments, keys, aggregates).status()); + } +} + +#define GROUP_BY_BENCHMARK(Name, Impl) \ + static void Name(benchmark::State& state) { \ + RegressionArgs args(state, false); \ + auto rng = random::RandomArrayGenerator(1923); \ + (Impl)(); \ + } \ + BENCHMARK(Name)->Apply([](benchmark::internal::Benchmark* bench) { \ + BenchmarkSetArgsWithSizes(bench, {1 * 1024 * 1024}); \ + }) + +GROUP_BY_BENCHMARK(SumDoublesGroupedBySmallStringSet, [&] { Review comment: Ah, needed to rename "sum" to "hash_sum" in there -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org