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.

21 lines
585 B

4 years ago
  1. use ark_curve_benches::*;
  2. use rand::SeedableRng;
  3. use rand_xorshift::XorShiftRng;
  4. use std::ops::{AddAssign, MulAssign, SubAssign};
  5. use ark_ec::ProjectiveCurve;
  6. use ark_ed_on_bls12_381::{fq::Fq, fr::Fr, EdwardsAffine as GAffine, EdwardsProjective as G};
  7. use ark_ff::{
  8. biginteger::{BigInteger256 as FrRepr, BigInteger256 as FqRepr},
  9. BigInteger, Field, PrimeField, SquareRootField, UniformRand,
  10. };
  11. mod g {
  12. use super::*;
  13. ec_bench!(G, GAffine);
  14. }
  15. f_bench!(Fq, Fq, FqRepr, FqRepr, fq);
  16. f_bench!(Fr, Fr, FrRepr, FrRepr, fr);
  17. bencher::benchmark_main!(fq, fr, g::group_ops);