You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/18 18:50:05 UTC

[GitHub] [arrow] fsaintjacques commented on a change in pull request #7213: ARROW-8841: [C++] Add benchmark and unittest for encoding::PLAIN spaced

fsaintjacques commented on a change in pull request #7213:
URL: https://github.com/apache/arrow/pull/7213#discussion_r426827408



##########
File path: cpp/src/parquet/encoding_benchmark.cc
##########
@@ -199,6 +200,153 @@ static void BM_PlainDecodingFloat(benchmark::State& state) {
 
 BENCHMARK(BM_PlainDecodingFloat)->Range(MIN_RANGE, MAX_RANGE);
 
+static void BM_PlainSpacedArgs(benchmark::internal::Benchmark* bench) {
+  static const auto BM_kPlainSpacedSize =
+      arrow::internal::CpuInfo::GetInstance()->CacheSize(
+          arrow::internal::CpuInfo::L1_CACHE);
+
+  bench->Args({/*size*/ BM_kPlainSpacedSize, /*null_percentage=*/1});
+  bench->Args({/*size*/ BM_kPlainSpacedSize, /*null_percentage=*/10});
+  bench->Args({/*size*/ BM_kPlainSpacedSize, /*null_percentage=*/50});
+}
+
+static void BM_PlainEncodingSpacedBoolean(benchmark::State& state) {
+  const auto num_values = state.range(0);
+  const double null_percent = static_cast<double>(state.range(1)) / 100.0;
+
+  const auto values = new bool[num_values];

Review comment:
       Use std::vector.




----------------------------------------------------------------
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.

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