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

Function ErrorSchemeStatusNoInline

cpp/src/arrow/type_benchmark.cc:337–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337static void ErrorSchemeStatusNoInline(
338 benchmark::State& state) { // NOLINT non-const reference
339 auto integers = RandomIntegers();
340
341 for (auto _ : state) {
342 int64_t total = 0;
343 for (const auto v : integers) {
344 int32_t value;
345 if (ARROW_PREDICT_TRUE(ErrorAsStatusNoInline(v, &value).ok())) {
346 total = Accumulate(total, value);
347 }
348 }
349 benchmark::DoNotOptimize(total);
350 }
351
352 state.SetItemsProcessed(state.iterations() * integers.size());
353}
354
355static void ErrorSchemeResult(benchmark::State& state) { // NOLINT non-const reference
356 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