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

define poly const in polyval pmull #223

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

tcoratger
Copy link
Contributor

poly can be defined as a constant at a file level and it doesn't need to be recalculated inside the function as it is an hardcoded value.

@newpavlov
Copy link
Member

Note that the compiler is "smart enough" to perform constant folding, so this change should have absolutely no runtime effect with enabled optimizations. But it results in a nicer code, so it's worth to merge it.

@newpavlov newpavlov merged commit 802b409 into RustCrypto:master Dec 16, 2024
22 checks passed
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