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

Function ErrorSchemeResultNoInline

cpp/src/arrow/type_benchmark.cc:386–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386static void ErrorSchemeResultNoInline(
387 benchmark::State& state) { // NOLINT non-const reference
388 auto integers = RandomIntegers();
389
390 for (auto _ : state) {
391 int64_t total = 0;
392 for (const auto v : integers) {
393 auto maybe_value = ErrorAsResultNoInline(v);
394 if (ARROW_PREDICT_TRUE(maybe_value.ok())) {
395 total = Accumulate(total, *std::move(maybe_value));
396 }
397 }
398 benchmark::DoNotOptimize(total);
399 }
400
401 state.SetItemsProcessed(state.iterations() * integers.size());
402}
403
404static void ErrorSchemeException(benchmark::State& state) { // NOLINT non-const reference
405 auto integers = RandomIntegers();

Callers

nothing calls this directly

Calls 4

RandomIntegersFunction · 0.85
AccumulateFunction · 0.85
okMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected