HerodotusDev / integrity

Apache License 2.0
65 stars 19 forks source link

Optimizations #136

Closed fmkra closed 2 months ago

fmkra commented 1 month ago

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:

fn rotr12(n: u32) -> u32 {
    let (high, low) = DivRem::div_rem(n, 4096);
    TryInto::<felt252, u32>::try_into(high.into() + low.into() * 1048576).unwrap()
}