#![allow(incomplete_features)] #![feature(generic_const_exprs)] #![feature(const_trait_impl)] use criterion::{black_box, criterion_group, criterion_main, Criterion}; use cryptix_ecc::CurvePoint; use cryptix_pairing::Pairing; use cryptix_bn254::pairing::e1::BN254Fp; use cryptix_bn254::pairing::e2::BN254Fp2; use cryptix_bn254::pairing::o_ate::OptimalAte; fn bench_pairing_time(c: &mut Criterion) { c.bench_function("bench pairing operation time", |b| { let p = BN254Fp::GENERATOR; let q = BN254Fp2::GENERATOR; b.iter(|| black_box(OptimalAte::pairing(p, q))) }); } criterion_group!(pairing_time_benches, bench_pairing_time); criterion_main!(pairing_time_benches);