Luminarys commented on a change in pull request #8475:
URL: https://github.com/apache/arrow/pull/8475#discussion_r507913864
##########
File path: cpp/src/arrow/util/decimal_benchmark.cc
##########
@@ -148,6 +148,21 @@ static void BinaryMathOp(benchmark::State& state) { //
NOLINT non-const referen
state.SetItemsProcessed(state.iterations() * kValueSize);
}
+static void BinaryMathOp256(benchmark::State& state) { // NOLINT non-const
reference
+ std::vector<BasicDecimal256> v1, v2;
+ for (uint64_t x = 0; x < kValueSize; x++) {
+ v1.push_back(BasicDecimal256({100 + x, 100 + x, 100 + x, 100 + x}));
+ v2.push_back(BasicDecimal256({200 + x, 200 + x, 200 + x, 200 + x}));
+ }
+
+ for (auto _ : state) {
+ for (int x = 0; x < kValueSize; x += 5) {
+ benchmark::DoNotOptimize(v1[x + 2] * v2[x + 2]);
Review comment:
As of right now we've only added support for operator*, I think as we
add more operators this benchmark can be expanded to reach parity with the
other.
----------------------------------------------------------------
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:
[email protected]