mirror of
https://github.com/logos-storage/circom-compat.git
synced 2026-01-05 22:43:08 +00:00
use Affine*::new_unchecked to speed up zkey loading
This commit is contained in:
parent
937f15269a
commit
71f1ceb11a
@ -344,7 +344,7 @@ fn deserialize_g1<R: Read>(reader: &mut R) -> IoResult<G1Affine> {
|
|||||||
if infinity {
|
if infinity {
|
||||||
Ok(G1Affine::identity())
|
Ok(G1Affine::identity())
|
||||||
} else {
|
} 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 {
|
if infinity {
|
||||||
Ok(G2Affine::identity())
|
Ok(G2Affine::identity())
|
||||||
} else {
|
} else {
|
||||||
Ok(G2Affine::new(f1, f2))
|
Ok(G2Affine::new_unchecked(f1, f2))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user