Skip to content

Commit

Permalink
apacheGH-37106: [C++] Remove overflowed integer rounding benchmarks (a…
Browse files Browse the repository at this point in the history
…pache#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: apache#37106

Authored-by: Jin Shang <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
js8544 authored Aug 10, 2023
1 parent 9b77edd commit f0904b3
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit f0904b3

Please sign in to comment.