fsaintjacques commented on a change in pull request #7213:
URL: https://github.com/apache/arrow/pull/7213#discussion_r426979057
##########
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:
I forgot about the bit-packing of std::vector<bool>. But yes, a
std::vector<char> with `static_cast<bool*>(values.data()) should work. Or just
use Int8Array like the other benchmark. It might be worth adding a quick
comment about this discrepancy.
----------------------------------------------------------------
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:
[email protected]