MCPcopy Create free account
hub / github.com/apache/arrow / BinaryMathOpDivide256

Function BinaryMathOpDivide256

cpp/src/arrow/util/decimal_benchmark.cc:229–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static void BinaryMathOpDivide256(
230 benchmark::State& state) { // NOLINT non-const reference
231 std::vector<BasicDecimal256> v1, v2;
232 for (uint64_t x = 0; x < kValueSize; x++) {
233 v1.push_back(BasicDecimal256({100 + x, 100 + x, 100 + x, 100 + x}));
234 v2.push_back(BasicDecimal256({200 + x, 200 + x, 200 + x, 200 + x}));
235 }
236
237 for (auto _ : state) {
238 for (int x = 0; x < kValueSize; ++x) {
239 auto divide = v1[x] / v2[x];
240 benchmark::DoNotOptimize(divide);
241 }
242 }
243 state.SetItemsProcessed(state.iterations() * kValueSize);
244}
245
246static void UnaryOp(benchmark::State& state) { // NOLINT non-const reference
247 std::vector<BasicDecimal128> v;

Callers

nothing calls this directly

Calls 2

BasicDecimal256Function · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected