use `Affine*::new_unchecked` to speed up zkey loading

This commit is contained in:
Dmitriy Ryajov 2024-02-15 09:03:54 -06:00
parent 937f15269a
commit 71f1ceb11a
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 2 additions and 2 deletions

View File

@ -344,7 +344,7 @@ fn deserialize_g1<R: Read>(reader: &mut R) -> IoResult<G1Affine> {
if infinity {
Ok(G1Affine::identity())
} else {
Ok(G1Affine::new(x, y))
Ok(G1Affine::new_unchecked(x, y))
}
}
@ -355,7 +355,7 @@ fn deserialize_g2<R: Read>(reader: &mut R) -> IoResult<G2Affine> {
if infinity {
Ok(G2Affine::identity())
} else {
Ok(G2Affine::new(f1, f2))
Ok(G2Affine::new_unchecked(f1, f2))
}
}