felipecrv commented on issue #38355:
URL: https://github.com/apache/arrow/issues/38355#issuecomment-1775872901

   When writing to a bitmap, the CPU can't write only the bits requested, the 
smallest unit of write is the byte but an entire 64-bit word is more friendly 
to the micro arch. The way more granularity is achieved (semantically) is by 
reading the bitmap and crafting a word that contains the existing bits and the 
new bits (when the bits being written don't align to the 64-bit boundaries).
   
   The `FirstTimeBitmapWriter` will not care about the bits on the tail of the 
word being written which allows it to write to the bitmap with less operations. 
It only needs to preserve the bits that antecede the bits being written, no 
need to read the bits that follow it on the bitmap memory into the word being 
written.
   
   It's faster when you know your next iteration is going to be over-writing 
the following bits.


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