|
// This loop shouldn't be shortcircuitable, since the compiler |
|
// shouldn't be able to reason about the value of the `u8` |
|
// unwrapped from the `ct_eq` result. |
|
let mut x = 1u8; |
|
for (ai, bi) in self.iter().zip(_rhs.iter()) { |
|
x &= ai.ct_eq(bi).unwrap_u8(); |
|
} |
Doesn't really rule out a simple if x == 0 goto end optimization. I assume the assembly was inspected but that should probably be annotated because it would have to be repeated when the compiler does smarter things.
subtle/src/lib.rs
Lines 332 to 338 in 6b6a81a
Doesn't really rule out a simple
if x == 0 goto endoptimization. I assume the assembly was inspected but that should probably be annotated because it would have to be repeated when the compiler does smarter things.