-
Notifications
You must be signed in to change notification settings - Fork 102
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
Second Attempt of VAES #186
base: master
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
pub(crate) fn shuffle_and_add_vec256(base: Vector256, to_add: Vector256) -> Vector256 { |
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.
Here and below, these should probably have an inline annotation
@@ -160,6 +210,9 @@ impl Hasher for AHasher { | |||
self.hash_in(value.convert()); | |||
} else { | |||
if data.len() > 32 { | |||
if data.len() > 128 { |
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.
This is sub-optimal. It's handling the >128 case but then the >64 case below is only for 65-128, which could be specialized be more efficient.
I would be tempted to avoid the additional if check if possible as branch mispredictions are more common and costly than show up in benchmarks where the data is predictable. But I don't have a good sense on how much is lost operating on 4 blocks at a time as opposed to 8.
No description provided.