You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "HadrienG2 (via GitHub)" <gi...@apache.org> on 2024/05/16 06:59:09 UTC
[PR] Remove harmful table lookup optimization for bitmap operations [arrow-rs]
HadrienG2 opened a new pull request, #5772:
URL: https://github.com/apache/arrow-rs/pull/5772
# Which issue does this PR close?
Closes #5771 .
# Rationale for this change
CPUs have efficient instructions for querying, setting and clearing bits, and modern compilers know how to turn simple bit indexing code into such instructions. The table lookup optimizations featured in the current code may have been useful in older versions of rustc, but as of rustc 1.78, they are a net pessimization. See issue #5771 for more details.
# What changes are included in this PR?
The implementation of bitmap operations is switched back to the simplest code, since it is currently the one that performs fastest.
# 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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove harmful table lookup optimization for bitmap operations [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #5772:
URL: https://github.com/apache/arrow-rs/pull/5772#issuecomment-2114799292
I ran a simple benchmark using this to count set bits, and this made a significant performance improvement
```
count_bits_naive time: [2.3391 µs 2.3446 µs 2.3541 µs]
change: [-82.296% -81.606% -80.866%] (p = 0.00 < 0.05)
Performance has improved.
```
Although, unsurprisingly, it is still way slower than the chunked version.
```
count_bits_chunked time: [19.770 ns 19.781 ns 19.793 ns]
```
--
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
Re: [PR] Remove harmful table lookup optimization for bitmap operations [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #5772:
URL: https://github.com/apache/arrow-rs/pull/5772
--
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