nalgebra/benches/linalg/symmetric_eigen.rs
2019-03-23 14:33:47 +01:00

27 lines
784 B
Rust

use na::{Matrix4, SymmetricEigen};
use test::{self, Bencher};
#[bench]
fn symmetric_eigen_decompose_4x4(bh: &mut Bencher) {
let m = Matrix4::<f64>::new_random();
bh.iter(|| test::black_box(SymmetricEigen::new(m.clone())))
}
#[bench]
fn symmetric_eigen_decompose_10x10(bh: &mut Bencher) {
let m = crate::reproductible_dmatrix(10, 10);
bh.iter(|| test::black_box(SymmetricEigen::new(m.clone())))
}
#[bench]
fn symmetric_eigen_decompose_100x100(bh: &mut Bencher) {
let m = crate::reproductible_dmatrix(100, 100);
bh.iter(|| test::black_box(SymmetricEigen::new(m.clone())))
}
#[bench]
fn symmetric_eigen_decompose_200x200(bh: &mut Bencher) {
let m = crate::reproductible_dmatrix(200, 200);
bh.iter(|| test::black_box(SymmetricEigen::new(m.clone())))
}