-
Notifications
You must be signed in to change notification settings - Fork 134
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 cpuid-bool efficiency #86
Conversation
Clippy errors are unrelated to changes in this PR. |
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.
Okay sorry, it took me awhile to figure out this is all working as expected, but now I've tested it out empirically and it seems to be working the way you described.
4f337b1
to
81691bd
Compare
Fixed clippy in #87 and rebased. Should be good to merge/release now. |
@newpavlov can you publish the crate? I don't have access. |
I plan to do it on the 1st of December as specified in the changelog. I will add you to the owners list a bit later. |
The new API creates a module which contains
InitToken
zero sized type. The only way to create a value of this type is via functions which ensure that initialization code has been executed. It should be slightly more efficient for our use-cases, since initialization branch can be eliminated from methods which work with initialized algorithm (e.g.update
andencrypt_blocks/decrypt_blocks
).In future it could be beneficial to add "cpuid enums", i.e. macro which would generate code not for a
bool
, but for a user-specified enum.