-
Notifications
You must be signed in to change notification settings - Fork 14
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
Optimized computation for block_len #50
Conversation
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.
Hmm...
I think the benefit of this change is too small for increasing complexity of the struct.
First, multiplication is as efficient as shifting, or just a little slower.
Second, division is significantly slower, but it is a small difference compared to the overall processing.
@kampersanda btw, it would make more sense to store the number of blocks rather than the number of elements, wouldn't it? |
@vbkaisetsu Makes sense. Your solution will allow for faster computation without increasing complexity. |
I implemented 0544cbc. |
Need #52 before merging this |
This PR implemented computations for
block_len
inBuildHelper
by using bit shift.