Skip to content

Simplify evaluation of hex-encoded number's length #338

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

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

fzhinkin
Copy link
Collaborator

@fzhinkin fzhinkin commented Jun 7, 2024

While preparing #337, I noticed that the way the length of the number to be encoded into a hexadecimal string could be significantly simplified. As a bonus, the clz-based version also works faster.

Moved the logic into a separate function to cover it with explicit tests.

@fzhinkin fzhinkin requested a review from shanshin June 7, 2024 14:10
@fzhinkin fzhinkin merged commit 4019a7e into develop Jun 12, 2024
1 check passed
@fzhinkin fzhinkin deleted the simplify-hex-number-length-calculation branch June 12, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants