Skip to content
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

Improve BoolReader::read_bool performance #19

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

okaneco
Copy link
Contributor

@okaneco okaneco commented Dec 17, 2023

Compute the required left shift using leading_zeros instead of shifting left one bit at a time per loop iteration.

This was the last bit of low-hanging decoder fruit I found back in October when looking at the hotspots from profiling.

Compute the required left shift using `leading_zeros` instead of
shifting left one bit at a time per loop iteration.
@fintelia fintelia merged commit f98b744 into image-rs:main Dec 17, 2023
9 checks passed
@okaneco okaneco deleted the boolreader branch December 17, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants