Optimizations to field and curve arithmetic

This commit is contained in:
Pratyush Mishra
2022-09-12 22:03:00 -07:00
parent 363426c1d4
commit 68f500da01
13 changed files with 82 additions and 39 deletions

View File

@@ -82,9 +82,7 @@ impl Fp3Config for Fq3Config {
];
#[inline(always)]
fn mul_fp_by_nonresidue(fe: &Self::Fp) -> Self::Fp {
let original = -(*fe);
let double = original + &original;
double + &double
fn mul_fp_by_nonresidue_in_place(fe: &mut Self::Fp) -> &mut Self::Fp {
fe.double_in_place().double_in_place()
}
}