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

Function MakeReplacements

cpp/src/arrow/compute/kernels/vector_replace_benchmark.cc:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33static constexpr random::SeedType kLongLength = 16384;
34
35static std::shared_ptr<Array> MakeReplacements(random::RandomArrayGenerator* generator,
36 const BooleanArray& mask) {
37 int64_t count = 0;
38 for (int64_t i = 0; i < mask.length(); i++) {
39 count += mask.Value(i) && mask.IsValid(i);
40 }
41 return generator->Int64(count, /*min=*/-65536, /*max=*/65536, /*null_probability=*/0.1);
42}
43
44static void ReplaceWithMaskLowSelectivityBench(
45 benchmark::State& state) { // NOLINT non-const reference

Calls 4

lengthMethod · 0.45
ValueMethod · 0.45
IsValidMethod · 0.45
Int64Method · 0.45

Tested by

no test coverage detected