Apply rustfmt to benchmarks

This commit is contained in:
Sean Bowe
2018-05-17 10:50:56 -06:00
parent 97bdd1655f
commit e4143a4bbc
7 changed files with 152 additions and 128 deletions

View File

@@ -9,9 +9,9 @@ fn bench_fq12_add_assign(b: &mut ::test::Bencher) {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES).map(|_| {
(Fq12::rand(&mut rng), Fq12::rand(&mut rng))
}).collect();
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES)
.map(|_| (Fq12::rand(&mut rng), Fq12::rand(&mut rng)))
.collect();
let mut count = 0;
b.iter(|| {
@@ -28,9 +28,9 @@ fn bench_fq12_sub_assign(b: &mut ::test::Bencher) {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES).map(|_| {
(Fq12::rand(&mut rng), Fq12::rand(&mut rng))
}).collect();
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES)
.map(|_| (Fq12::rand(&mut rng), Fq12::rand(&mut rng)))
.collect();
let mut count = 0;
b.iter(|| {
@@ -47,9 +47,9 @@ fn bench_fq12_mul_assign(b: &mut ::test::Bencher) {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES).map(|_| {
(Fq12::rand(&mut rng), Fq12::rand(&mut rng))
}).collect();
let v: Vec<(Fq12, Fq12)> = (0..SAMPLES)
.map(|_| (Fq12::rand(&mut rng), Fq12::rand(&mut rng)))
.collect();
let mut count = 0;
b.iter(|| {
@@ -66,9 +66,7 @@ fn bench_fq12_squaring(b: &mut ::test::Bencher) {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let v: Vec<Fq12> = (0..SAMPLES).map(|_| {
Fq12::rand(&mut rng)
}).collect();
let v: Vec<Fq12> = (0..SAMPLES).map(|_| Fq12::rand(&mut rng)).collect();
let mut count = 0;
b.iter(|| {
@@ -85,9 +83,7 @@ fn bench_fq12_inverse(b: &mut ::test::Bencher) {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let v: Vec<Fq12> = (0..SAMPLES).map(|_| {
Fq12::rand(&mut rng)
}).collect();
let v: Vec<Fq12> = (0..SAMPLES).map(|_| Fq12::rand(&mut rng)).collect();
let mut count = 0;
b.iter(|| {