Add benchmark for mul_assign
This commit is contained in:
parent
a08e45c4aa
commit
a00f0e3525
|
@ -0,0 +1,17 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
extern crate jubjub;
|
||||
|
||||
use std::ops::MulAssign;
|
||||
use test::Bencher;
|
||||
use jubjub::Fq;
|
||||
|
||||
#[bench]
|
||||
fn bench_mul_assign(bencher: &mut Bencher) {
|
||||
let mut n = Fq::new([2, 2, 2, 2]);
|
||||
let m = Fq::new([2, 2, 2, 2]);
|
||||
bencher.iter(move || {
|
||||
n.mul_assign(&m);
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue