2017-08-03 01:38:28 +08:00
|
|
|
use na::{DMatrix, Matrix4};
|
|
|
|
use nl::Hessenberg;
|
2018-11-07 01:32:20 +08:00
|
|
|
use test::{self, Bencher};
|
2017-08-03 01:38:28 +08:00
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn hessenberg_decompose_100x100(bh: &mut Bencher) {
|
|
|
|
let m = DMatrix::<f64>::new_random(100, 100);
|
|
|
|
bh.iter(|| test::black_box(Hessenberg::new(m.clone())))
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn hessenberg_decompose_4x4(bh: &mut Bencher) {
|
|
|
|
let m = Matrix4::<f64>::new_random();
|
|
|
|
bh.iter(|| test::black_box(Hessenberg::new(m.clone())))
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn hessenberg_decompose_500x500(bh: &mut Bencher) {
|
|
|
|
let m = DMatrix::<f64>::new_random(500, 500);
|
|
|
|
bh.iter(|| test::black_box(Hessenberg::new(m.clone())))
|
|
|
|
}
|