From d9fdb0af24042e5635608f8df5cccbb24ff89bb4 Mon Sep 17 00:00:00 2001 From: Jin Shang Date: Thu, 10 Aug 2023 23:36:32 +0800 Subject: [PATCH] GH-37106: [C++] Remove overflowed integer rounding benchmarks (#37109) ### Rationale for this change The valid range of 8 and 16 bit integers is too small, which causes failures on `round` benchmarks. ### What changes are included in this PR? `Round` benchmarks for <32 bit integers are removed. Arithmetic on small int widths is probably uncommon. ### Are these changes tested? The benchmark is now running successfully on my machine. ### Are there any user-facing changes? No. * Closes: #37106 Authored-by: Jin Shang Signed-off-by: Antoine Pitrou --- cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc b/cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc index 2e662632cdeec..3c5bb76dc24e9 100644 --- a/cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc +++ b/cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc @@ -116,12 +116,8 @@ void SetRoundArgs(benchmark::internal::Benchmark* bench) { #define DECLARE_BASIC_BENCHMARKS(BENCHMARK, OP) \ BENCHMARK_TEMPLATE(BENCHMARK, OP, Int64Type)->Apply(SetRoundArgs); \ BENCHMARK_TEMPLATE(BENCHMARK, OP, Int32Type)->Apply(SetRoundArgs); \ - BENCHMARK_TEMPLATE(BENCHMARK, OP, Int16Type)->Apply(SetRoundArgs); \ - BENCHMARK_TEMPLATE(BENCHMARK, OP, Int8Type)->Apply(SetRoundArgs); \ BENCHMARK_TEMPLATE(BENCHMARK, OP, UInt64Type)->Apply(SetRoundArgs); \ BENCHMARK_TEMPLATE(BENCHMARK, OP, UInt32Type)->Apply(SetRoundArgs); \ - BENCHMARK_TEMPLATE(BENCHMARK, OP, UInt16Type)->Apply(SetRoundArgs); \ - BENCHMARK_TEMPLATE(BENCHMARK, OP, UInt8Type)->Apply(SetRoundArgs); \ BENCHMARK_TEMPLATE(BENCHMARK, OP, FloatType)->Apply(SetRoundArgs); \ BENCHMARK_TEMPLATE(BENCHMARK, OP, DoubleType)->Apply(SetRoundArgs); @@ -151,12 +147,8 @@ void SetRoundArgs(benchmark::internal::Benchmark* bench) { #define DECLARE_ROUND_BENCHMARKS(BENCHMARK, OP) \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, Int64Type); \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, Int32Type); \ - DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, Int16Type); \ - DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, Int8Type); \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, UInt64Type); \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, UInt32Type); \ - DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, UInt16Type); \ - DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, UInt8Type); \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, FloatType); \ DECLARE_ROUND_BENCHMARKS_WITH_ROUNDMODE(BENCHMARK, OP, DoubleType);