You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "rok (via GitHub)" <gi...@apache.org> on 2023/02/28 00:39:19 UTC

[GitHub] [arrow] rok commented on a diff in pull request #34323: GH-34322: [C++][Parquet] Encoding Microbench for ByteArray

rok commented on code in PR #34323:
URL: https://github.com/apache/arrow/pull/34323#discussion_r1119457715


##########
cpp/src/parquet/encoding_benchmark.cc:
##########
@@ -569,6 +569,126 @@ BENCHMARK(BM_DeltaBitPackingDecode_Int64_Narrow)->Range(MIN_RANGE, MAX_RANGE);
 BENCHMARK(BM_DeltaBitPackingDecode_Int32_Wide)->Range(MIN_RANGE, MAX_RANGE);
 BENCHMARK(BM_DeltaBitPackingDecode_Int64_Wide)->Range(MIN_RANGE, MAX_RANGE);
 
+void EncodingByteArrayBenchmark(benchmark::State& state, Encoding::type encoding) {
+  ::arrow::random::RandomArrayGenerator rag(0);
+  // Using arrow generator to generate random data.
+  int32_t max_length = state.range(0);
+  auto array =
+      rag.String(/* size */ 1024, /* min_length */ 0, /* max_length */ max_length,

Review Comment:
   I'd add different options only if there is nonlinear behavior (time complexity != O(n)).



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org