jhorstmann opened a new pull request, #2077:
URL: https://github.com/apache/arrow-rs/pull/2077

   # Which issue does this PR close?
   
   <!---
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #2060.
   
   # Rationale for this change
    
   Using `copy_from_slice` here reduces the number of bounds checks to one per 
chunk instead of one per byte.
   
   Performance of `boolean_append_packed` improves by about 40% on my laptop.
   
   ```
   $ RUSTFLAGS="-Ctarget-cpu=skylake" perf record cargo bench --bench 
boolean_append_packed
   boolean_append_packed   time:   [11.634 us 11.712 us 11.802 us]              
                     
                           change: [-41.447% -40.956% -40.476%] (p = 0.00 < 
0.05)
                           Performance has improved.
   ```
   
   Further improvements should be possible by asserting the bounds once on 
function entry and then using unsafe `ptr::copy_non_overlapping` in the main 
loop and `get_bit_raw`/`set_bit_raw` for the non-aligned parts.
   
   # What changes are included in this PR?
   
   <!---
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   No


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