wesm commented on pull request #10679:
URL: https://github.com/apache/arrow/pull/10679#issuecomment-876226830


   I guess branch prediction works really well on modern processors — when the 
filter values are mostly false then the if block is rarely executed. In the 50% 
selected case, branch prediction doesn't help so this method yields speedups. 
   
   Not sure if it's worth investigating, but moving `out_position_` from a 
class member to a stack variable could have some performance impact. Another 
thought is removing some of the offset arithmetic
   
   Lastly, since we're using `SetBitTo` a lot, it might be worth checking the 
superscalar variant described at
   
   
https://graphics.stanford.edu/~seander/bithacks.html#ConditionalSetOrClearBitsWithoutBranching


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