Skip to content

Commit 6c3a3ac

Browse files
committed
Use interleaving to improve Fp multiplication
This only changes the `Mul` impl, which is non-const.
1 parent ed8f172 commit 6c3a3ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'a, 'b> Mul<&'b Fp> for &'a Fp {
151151

152152
#[inline]
153153
fn mul(self, rhs: &'b Fp) -> Fp {
154-
self.mul(rhs)
154+
Fp::sum_of_products([*self], [*rhs])
155155
}
156156
}
157157

0 commit comments

Comments
 (0)