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.

29 lines
787 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. use ark_algebra_bench_templates::*;
  2. use ark_std::ops::{AddAssign, MulAssign, SubAssign};
  3. use ark_cp6_782::{
  4. fq::Fq, fq3::Fq3, fr::Fr, Fq6, G1Affine, G1Prepared, G1Projective as G1, G2Affine, G2Prepared,
  5. G2Projective as G2, CP6_782,
  6. };
  7. use ark_ec::{CurveGroup, Group};
  8. use ark_ff::{
  9. biginteger::{BigInteger384 as FrRepr, BigInteger832 as FqRepr},
  10. BigInteger, Field, PrimeField, UniformRand,
  11. };
  12. mod g1 {
  13. use super::*;
  14. ec_bench!(G1, G1Affine);
  15. }
  16. mod g2 {
  17. use super::*;
  18. ec_bench!(G2, G2Affine);
  19. }
  20. f_bench!(extension, Fq3, Fq3, fq3);
  21. f_bench!(target, Fq6, Fq6, fq6);
  22. f_bench!(Fq, Fq, FqRepr, FqRepr, fq);
  23. f_bench!(Fr, Fr, FrRepr, FrRepr, fr);
  24. pairing_bench!(CP6_782, Fq6);
  25. bencher::benchmark_main!(fq, fr, fq3, fq6, g1::group_ops, g2::group_ops, pairing);