Merge pull request #866 from vks/improve-bench
Improvements to benchmarks
This commit is contained in:
commit
511a51592f
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(test)]
|
||||
#![feature(bench_black_box)]
|
||||
#![allow(unused_macros)]
|
||||
|
||||
extern crate nalgebra as na;
|
||||
|
@ -1,4 +1,3 @@
|
||||
use test::Bencher;
|
||||
use na::{DMatrix, Eigen};
|
||||
|
||||
fn eigen_100x100(bh: &mut criterion::Criterion) {
|
||||
|
Loading…
Reference in New Issue
Block a user