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

Function MakeSequentialIntDictFodder

cpp/src/arrow/builder_benchmark.cc:261–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259// Make a vector out of `n_distinct` sequential int values
260template <class Integer = ValueType>
261static std::vector<Integer> MakeSequentialIntDictFodder() {
262 std::default_random_engine gen(42);
263 std::vector<Integer> values(kNumberOfElements);
264 {
265 std::uniform_int_distribution<Integer> values_dist(0, kDistinctElements - 1);
266 std::generate(values.begin(), values.end(), [&]() { return values_dist(gen); });
267 }
268 return values;
269}
270
271// Make a vector out of `n_distinct` int values with potentially colliding hash
272// entries as only their highest bits differ.

Callers 1

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected