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

Function HashIntegers

cpp/src/arrow/util/hashing_benchmark.cc:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void HashIntegers(benchmark::State& state) { // NOLINT non-const reference
66 const std::vector<int64_t> values = MakeIntegers<int64_t>(10000);
67
68 while (state.KeepRunning()) {
69 hash_t total = 0;
70 for (const int64_t v : values) {
71 total += ScalarHelper<int64_t, 0>::ComputeHash(v);
72 total += ScalarHelper<int64_t, 1>::ComputeHash(v);
73 }
74 benchmark::DoNotOptimize(total);
75 }
76 state.SetBytesProcessed(2 * state.iterations() * values.size() * sizeof(int64_t));
77 state.SetItemsProcessed(2 * state.iterations() * values.size());
78}
79
80static void BenchmarkStringHashing(benchmark::State& state, // NOLINT non-const reference
81 const std::vector<std::string>& values) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected