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

Function ErrorSchemeResultNoInline

cpp/src/arrow/type_benchmark.cc:372–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372static void ErrorSchemeResultNoInline(
373 benchmark::State& state) { // NOLINT non-const reference
374 auto integers = RandomIntegers();
375
376 for (auto _ : state) {
377 int64_t total = 0;
378 for (const auto v : integers) {
379 auto maybe_value = ErrorAsResultNoInline(v);
380 if (ARROW_PREDICT_TRUE(maybe_value.ok())) {
381 total = Accumulate(total, *std::move(maybe_value));
382 }
383 }
384 benchmark::DoNotOptimize(total);
385 }
386
387 state.SetItemsProcessed(state.iterations() * integers.size());
388}
389
390static void ErrorSchemeException(benchmark::State& state) { // NOLINT non-const reference
391 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