Merge pull request #866 from vks/improve-bench

Improvements to benchmarks
This commit is contained in:
Sébastien Crozet 2021-05-09 16:59:23 +02:00 committed by GitHub
commit 511a51592f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ proptest = { version = "1", optional = true, default-features = false, features
serde_json = "1.0"
rand_xorshift = "0.3"
rand_isaac = "0.3"
criterion = "0.2.10"
criterion = { version = "0.3", features = ["html_reports"] }
# For matrix comparison macro
matrixcompare = "0.3.0"
@ -105,6 +105,7 @@ required-features = ["compare"]
name = "nalgebra_bench"
harness = false
path = "benches/lib.rs"
required-features = ["rand"]
[profile.bench]
lto = true

View File

@ -188,7 +188,7 @@ fn tr_mul_to(bench: &mut criterion::Criterion) {
let b = DVector::<f64>::new_random(1000);
let mut c = DVector::from_element(1000, 0.0);
bench.bench_function("", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
bench.bench_function("tr_mul_to", move |bh| bh.iter(|| a.tr_mul_to(&b, &mut c)));
}
fn mat_mul_mat(bench: &mut criterion::Criterion) {

View File

@ -1,4 +1,4 @@
#![feature(test)]
#![feature(bench_black_box)]
#![allow(unused_macros)]
extern crate nalgebra as na;

View File

@ -1,4 +1,3 @@
use test::Bencher;
use na::{DMatrix, Eigen};
fn eigen_100x100(bh: &mut criterion::Criterion) {