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

Function BinaryMathOpDivide128

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

Source from the content-addressed store, hash-verified

177}
178
179static void BinaryMathOpDivide128(
180 benchmark::State& state) { // NOLINT non-const reference
181 std::vector<BasicDecimal128> v1, v2;
182 for (int x = 0; x < kValueSize; x++) {
183 v1.emplace_back(100 + x, 100 + x);
184 v2.emplace_back(200 + x, 200 + x);
185 }
186
187 for (auto _ : state) {
188 for (int x = 0; x < kValueSize; ++x) {
189 auto divide = v1[x] / v2[x];
190 benchmark::DoNotOptimize(divide);
191 }
192 }
193 state.SetItemsProcessed(state.iterations() * kValueSize);
194}
195
196static void BinaryMathOpAdd256(benchmark::State& state) { // NOLINT non-const reference
197 std::vector<BasicDecimal256> v1, v2;

Callers

nothing calls this directly

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected