Correct benchmark

It was doing less work, because it did not calculate the variance.
This commit is contained in:
Vinzent Steinberg 2017-05-24 18:39:54 +02:00
parent 30ea084366
commit b371d3e8bc

View File

@ -23,7 +23,7 @@ fn initialize_vec() -> Vec<f64> {
fn bench_average(b: &mut Bencher) {
let values = initialize_vec();
b.iter(|| {
let a: average::Average = values.iter().map(|x| *x).collect();
let a: average::AverageWithError = values.iter().map(|x| *x).collect();
a
});
}