mirror of
https://github.com/logos-storage/rust-poseidon-bn254-pure.git
synced 2026-02-09 02:33:06 +00:00
a little bit more inlining...
This commit is contained in:
parent
e3c83cbcad
commit
8dbb8fe359
@ -147,6 +147,7 @@ fn main() {
|
||||
let elapsed = now.elapsed();
|
||||
println!("Elapsed: {:.3?}", elapsed);
|
||||
|
||||
/*
|
||||
println!("");
|
||||
println!("sanity checking comparison with the prime");
|
||||
let one : Big = BigInt::from_u32(1);
|
||||
@ -160,6 +161,7 @@ fn main() {
|
||||
BigInt::is_lt_prime(&a) ,
|
||||
BigInt::is_lt_prime(&b) ,
|
||||
BigInt::is_lt_prime(&c) );
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -11,12 +11,14 @@ pub type MontTriple = (Mont,Mont,Mont);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#[inline(always)]
|
||||
fn sbox(x: Mont) -> Mont {
|
||||
let x2 = Mont::sqr(&x );
|
||||
let x4 = Mont::sqr(&x2);
|
||||
Mont::mul(&x,&x4)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn add3(x: Mont, y: Mont, z: Mont) -> Mont {
|
||||
Mont::add(&Mont::add(&x,&y),&z)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user