-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-44795: [C++] Use arrow::util::span on arrow::util::bitmap_builders_utilities instead of std::vector #44796
Conversation
|
@raulcd Yes, this is the kind of change I had in mind. See comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you @raulcd
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 7af2ad4. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
arrow::util::span
(a backport of C++20std::span
) is more generally applicable thanstd::vector
, so any public API currently accepting a vector const-ref argument should instead accept a span argument.What changes are included in this PR?
arrow::util::BytesToBits
acceptsarrow::util::span
instead ofstd::vector
Are these changes tested?
Yes, existing C++ tests via CI
Are there any user-facing changes?
Yes, from
Result<std::shared_ptr<Buffer>> BytesToBits(const std::vector<uint8_t>&, MemoryPool* pool)
toResult<std::shared_ptr<Buffer>> BytesToBits(util::span<const uint8_t> bytes, MemoryPool* pool)
const vector<T>&
argument should instead take aspan<const T>
#44795