mapleFU commented on code in PR #38158:
URL: https://github.com/apache/arrow/pull/38158#discussion_r1350546508


##########
cpp/src/parquet/encoding.cc:
##########
@@ -1156,16 +1160,21 @@ inline int PlainBooleanDecoder::DecodeArrow(
 
 int PlainBooleanDecoder::Decode(uint8_t* buffer, int max_values) {
   max_values = std::min(max_values, num_values_);
-  bool val;
+  constexpr int kBatchSize = 1024;
+  std::array<bool, kBatchSize> bit_read_scratch;
   ::arrow::internal::BitmapWriter bit_writer(buffer, 0, max_values);

Review Comment:
   And in fact the fastest the way is directly copy LSB bits to BitWriter 🤔



##########
cpp/src/parquet/encoding.cc:
##########
@@ -1156,16 +1160,21 @@ inline int PlainBooleanDecoder::DecodeArrow(
 
 int PlainBooleanDecoder::Decode(uint8_t* buffer, int max_values) {
   max_values = std::min(max_values, num_values_);
-  bool val;
+  constexpr int kBatchSize = 1024;
+  std::array<bool, kBatchSize> bit_read_scratch;
   ::arrow::internal::BitmapWriter bit_writer(buffer, 0, max_values);

Review Comment:
   And in fact the fastest the way is directly copy LSB bits to BitWriter 🤔



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

Reply via email to