You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/18 09:46:00 UTC

[GitHub] [arrow-rs] HaoYang670 commented on issue #1337: Refactor the code of `Bitmap::new`

HaoYang670 commented on issue #1337:
URL: https://github.com/apache/arrow-rs/issues/1337#issuecomment-1044231984


   Hope we could get a little performance improvement from it because faster arithmetical calculation is used:
   ```rust
   pub fn round_upto_power_of_2(num: usize, factor: usize) -> usize {
       debug_assert!(factor > 0 && (factor & (factor - 1)) == 0);
       (num + (factor - 1)) & !(factor - 1)
   }
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org