Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
added benchmark bn_128_add for EIP #198
Browse files Browse the repository at this point in the history
  • Loading branch information
timxor committed Aug 9, 2017
1 parent fe3cfa8 commit 7970ef1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ethcore/benches/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ fn bn_128_pairing(b: &mut Bencher) {
});
}

#[bench]
fn bn_128_add(b: &mut Bencher) {
use bn::{AffineG1, G1, Group};

let mut rng = StdRng::new().unwrap();
let p1: G1 = G1::random(&mut rng);
let p2: G1 = G1::random(&mut rng);

b.iter(|| {
let _ = AffineG1::from_jacobian(p1 + p2);
});
}

#[bench]
fn bn_128_mul(b: &mut Bencher) {
use bn::{AffineG1, G1, Fr, Group};
Expand Down

0 comments on commit 7970ef1

Please sign in to comment.