We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Optimize CompactBitArray.NumTrueBitsBefore.
Currently, CompactBitArray.NumTrueBitsBefore perform a loop and test bit set using bitwise:
CompactBitArray.NumTrueBitsBefore
cosmos-sdk/crypto/types/compact_bit_array.go
Line 101 in e8e5c08
It can be faster, by taking advantage of hardware supports.
Instead of doing bitwise, using standard bits.OnesCount8.
bits.OnesCount8
The text was updated successfully, but these errors were encountered:
Fixed after #9216
Sorry, something went wrong.
No branches or pull requests
Summary
Optimize CompactBitArray.NumTrueBitsBefore.
Problem Definition
Currently,
CompactBitArray.NumTrueBitsBefore
perform a loop and test bit set using bitwise:cosmos-sdk/crypto/types/compact_bit_array.go
Line 101 in e8e5c08
It can be faster, by taking advantage of hardware supports.
Proposal
Instead of doing bitwise, using standard
bits.OnesCount8
.For Admin Use
The text was updated successfully, but these errors were encountered: