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

Function ErrorSchemeBool

cpp/src/arrow/type_benchmark.cc:299–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299static void ErrorSchemeBool(benchmark::State& state) { // NOLINT non-const reference
300 auto integers = RandomIntegers();
301
302 for (auto _ : state) {
303 int64_t total = 0;
304 for (const auto v : integers) {
305 auto pair = ErrorAsBool(v);
306 if (!ARROW_PREDICT_FALSE(pair.first)) {
307 total = Accumulate(total, pair.second);
308 }
309 }
310 benchmark::DoNotOptimize(total);
311 }
312
313 state.SetItemsProcessed(state.iterations() * integers.size());
314}
315
316static void ErrorSchemeBoolNoInline(
317 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 4

RandomIntegersFunction · 0.85
ErrorAsBoolFunction · 0.85
AccumulateFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected