Skip to content

Conversation

@imraniac
Copy link

@imraniac imraniac commented Dec 20, 2025

Rationale for this change

This change replaces custom implementations of bit manipulation functions with C++20 standard library functions from the header. This will reduce the code complexity.

What changes are included in this PR?

Updated the cpp/src/arrow/util/bit_util.h file to replace the custom implementation for PopCount, CountLeadingZeros, and CountTrailingZeros with C++20 standard library functions std::popcount(), std::countl_zero() and std::countr_zero() respectively.

Are these changes tested?

Yes

Are there any user-facing changes?

No, this is an internal refactoring of bit utility functions.

@github-actions
Copy link

⚠️ GitHub issue #48591 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant