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

Function ErrorSchemeStatusNoInline

cpp/src/arrow/type_benchmark.cc:351–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static void ErrorSchemeStatusNoInline(
352 benchmark::State& state) { // NOLINT non-const reference
353 auto integers = RandomIntegers();
354
355 for (auto _ : state) {
356 int64_t total = 0;
357 for (const auto v : integers) {
358 int32_t value;
359 if (ARROW_PREDICT_TRUE(ErrorAsStatusNoInline(v, &value).ok())) {
360 total = Accumulate(total, value);
361 }
362 }
363 benchmark::DoNotOptimize(total);
364 }
365
366 state.SetItemsProcessed(state.iterations() * integers.size());
367}
368
369static void ErrorSchemeResult(benchmark::State& state) { // NOLINT non-const reference
370 auto integers = RandomIntegers();

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected