You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
731 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. use ark_curve_benches::*;
  2. use ark_std::ops::{AddAssign, MulAssign, SubAssign};
  3. use ark_ec::{PairingEngine, ProjectiveCurve};
  4. use ark_ff::{biginteger::BigInteger320 as FqRepr, BigInteger, Field, PrimeField, UniformRand};
  5. use ark_mnt4_298::{
  6. fq::Fq, fq2::Fq2, fr::Fr, Fq4, G1Affine, G1Projective as G1, G2Affine, G2Projective as G2,
  7. MNT4_298,
  8. };
  9. mod g1 {
  10. use super::*;
  11. ec_bench!(G1, G1Affine);
  12. }
  13. mod g2 {
  14. use super::*;
  15. ec_bench!(G2, G2Affine);
  16. }
  17. f_bench!(extension, Fq2, Fq2, fq2);
  18. f_bench!(target, Fq4, Fq4, fq4);
  19. f_bench!(Fq, Fq, FqRepr, FqRepr, fq);
  20. f_bench!(Fr, Fr, FqRepr, FqRepr, fr);
  21. pairing_bench!(MNT4_298, Fq4);
  22. bencher::benchmark_main!(fq, fr, fq2, fq4, g1::group_ops, g2::group_ops, pairing);