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

Function TypeEqualsComplex

cpp/src/arrow/type_benchmark.cc:54–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static void TypeEqualsComplex(benchmark::State& state) { // NOLINT non-const reference
55 auto fa1 = field("as", list(float16()));
56 auto fa2 = field("as", list(float16()));
57 auto fb1 = field("bs", utf8());
58 auto fb2 = field("bs", utf8());
59 auto fc1 = field("cs", list(fixed_size_binary(10)));
60 auto fc2 = field("cs", list(fixed_size_binary(10)));
61 auto fc3 = field("cs", list(fixed_size_binary(11)));
62
63 auto a = struct_({fa1, fb1, fc1});
64 auto b = struct_({fa2, fb2, fc2});
65 auto c = struct_({fa2, fb2, fc3});
66
67 int64_t total = 0;
68 for (auto _ : state) {
69 total += a->Equals(*b);
70 total += a->Equals(*c);
71 }
72 benchmark::DoNotOptimize(total);
73 state.SetItemsProcessed(state.iterations() * 2);
74}
75
76static void TypeEqualsWithMetadata(
77 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 5

listFunction · 0.85
fixed_size_binaryFunction · 0.85
struct_Function · 0.85
fieldFunction · 0.70
EqualsMethod · 0.45

Tested by

no test coverage detected