-
Notifications
You must be signed in to change notification settings - Fork 55
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
Normalize the usage of prefixes for method names #417
Conversation
Ooh nice. This has bugged me as well, especially as all of the |
Why do you think so? Why would LLVM turn bitwise operations into branches? But in any case, this PR just renames stuff, it doesn't change the functionality in any way. This actually made me go take a look at how some constant-time operations are implemented in To expand on that, I wonder if |
I've seen at least alleged cases of it happening: https://github.com/klutzy/nadeko#why This is the whole point of a crate like
I don't know why
It would generally be good for |
What barrier specifically? Can we add it to |
That's strange, I tested the example code from Readme in Godbolt, and it gives a branch-free assembly with -O3. |
It's currently using a volatile read: https://github.com/dalek-cryptography/subtle/blob/b3ba6bc/src/lib.rs#L229-L243 I don't think there's any way to make that work with Likewise (Note: I have not carefully scrutinized what the performance impact of that would be) And all of this is why I've begrudgingly accepted the existence of |
Regardless, these are classes of optimizations LLVM is free to do. There was quite a bit of discussion on this issue: The-DevX-Initiative/RCIG_Coordination_Repo#55 |
Sidebar: it would probably be good to spell all of this out somewhere in the documentation of |
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.
Looks great!
CtChoice
toConstChoice
(to distinguish it fromsubtle::Choice
)