Rich-T-kid opened a new pull request, #11867:
URL: https://github.com/apache/arrow-rs/pull/11867

   # Which issue does this PR close?
   
   N/A. Follow-up to #11732.
   
   # Rationale for this change
   
   Callers with packed validity bits currently need to append them one bit at a 
time or first build a `NullBuffer`.
   
   # What changes are included in this PR?
   
   This adds `NullBufferBuilder::append_word`, matching 
`BooleanBufferBuilder::append_word` while preserving lazy allocation for 
all-valid words. It also adds focused unit tests and a benchmark against 
per-bit appends.
   
   # Are these changes tested?
   
   The tests cover aligned and unaligned writes, partial words, all-valid 
words, and appends after materialization.
   
   Local benchmark on an Apple M4 Max, appending 32K validity bits:
   
   | Input | Per bit | Per word | Speedup |
   |---|---:|---:|---:|
   | All valid | 19.57 us | 404.81 ns | 48.3x |
   | Sparse nulls | 66.67 us | 1.74 us | 38.4x |
   | Alternating | 66.10 us | 2.06 us | 32.0x |
   
   # Are there any significant user-facing changes?
   
   Adds `NullBufferBuilder::append_word`.
   


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