-
Notifications
You must be signed in to change notification settings - Fork 23
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
Optimizations #136
Optimizations #136
Conversation
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.
LGTM
src/common/blake2s_u8.cairo
Outdated
@@ -52,21 +52,26 @@ fn get_sigma(r: u32) -> Array<u32> { | |||
} | |||
|
|||
fn rotr16(n: u32) -> u32 { | |||
n / 65536 + (n % 65536) * 65536 | |||
let (high, low) = DivRem::div_rem(n, 65536); | |||
high + (low % 65536) * 65536 |
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.
The % shouldn't be needed
src/common/blake2s.cairo
Outdated
@@ -51,19 +51,23 @@ fn get_sigma(r: u32) -> Array<u32> { | |||
} | |||
|
|||
fn rotr16(n: u32) -> u32 { | |||
n / 65536 + (n % 65536) * 65536 | |||
let (high, low) = DivRem::div_rem(n, 65536); | |||
high + (low % 65536) * 65536 |
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.
The % shouldn't be needed
I don't know what happened but code fragment you've sent isn't present on this branch. This is already fixed and looks like:
|
No description provided.