pitrou commented on code in PR #34323:
URL: https://github.com/apache/arrow/pull/34323#discussion_r1120119939
##########
cpp/src/parquet/encoding_benchmark.cc:
##########
@@ -634,6 +761,26 @@ static void
BM_DictDecodingInt64_literals(benchmark::State& state) {
BENCHMARK(BM_DictDecodingInt64_literals)->Range(MIN_RANGE, MAX_RANGE);
+static void BM_DictDecodingByteArray(benchmark::State& state) {
+ ::arrow::random::RandomArrayGenerator rag(0);
+ // Using arrow generator to generate random data.
+ int32_t max_length = static_cast<int32_t>(state.range(0));
+ int32_t array_size = static_cast<int32_t>(state.range(1));
+ auto array =
+ rag.String(/* size */ array_size, /* min_length */ 0, /* max_length */
max_length,
+ /* null_probability */ 0);
+ const auto array_actual =
+ ::arrow::internal::checked_pointer_cast<::arrow::StringArray>(array);
+ auto encoder = MakeDictDecoder<ByteArrayType>();
+ std::vector<ByteArray> values;
+ for (int i = 0; i < array_actual->length(); ++i) {
+ values.emplace_back(array_actual->GetView(i));
+ }
+ DecodeDict<ByteArrayType>(values, state);
Review Comment:
Can you add a `SetItemsProcessed` at the end of `DecodeDict`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]