Update bench to latest Rust
This commit is contained in:
parent
7c11ec250a
commit
a1f23da32b
2 changed files with 86 additions and 259 deletions
|
@ -17,7 +17,7 @@
|
|||
#[feature(globs)];
|
||||
|
||||
extern crate cgmath;
|
||||
extern crate extra;
|
||||
extern crate test;
|
||||
|
||||
// pub mod array;
|
||||
pub mod matrix;
|
||||
|
|
|
@ -16,14 +16,11 @@
|
|||
use cgmath::matrix::*;
|
||||
use cgmath::vector::*;
|
||||
|
||||
use extra;
|
||||
|
||||
type float = f32;
|
||||
use test::Bencher;
|
||||
|
||||
pub mod matrix2 {
|
||||
use cgmath::matrix::*;
|
||||
use cgmath::vector::*;
|
||||
type float = f32;
|
||||
|
||||
pub static A: Matrix2<f32> = Matrix2 { x: Vector2 { x: 1.0, y: 3.0 },
|
||||
y: Vector2 { x: 2.0, y: 4.0 } };
|
||||
|
@ -34,7 +31,6 @@ pub mod matrix2 {
|
|||
pub mod matrix3 {
|
||||
use cgmath::matrix::*;
|
||||
use cgmath::vector::*;
|
||||
type float = f32;
|
||||
|
||||
pub static A: Matrix3<f32> = Matrix3 { x: Vector3 { x: 1.0, y: 4.0, z: 7.0 },
|
||||
y: Vector3 { x: 2.0, y: 5.0, z: 8.0 },
|
||||
|
@ -47,7 +43,6 @@ pub mod matrix3 {
|
|||
pub mod matrix4 {
|
||||
use cgmath::matrix::*;
|
||||
use cgmath::vector::*;
|
||||
type float = f32;
|
||||
|
||||
pub static A: Matrix4<f32> = Matrix4 { x: Vector4 { x: 1.0, y: 5.0, z: 9.0, w: 13.0 },
|
||||
y: Vector4 { x: 2.0, y: 6.0, z: 10.0, w: 14.0 },
|
||||
|
@ -60,422 +55,254 @@ pub mod matrix4 {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_mul_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_mul_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_mul_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_mul_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_mul_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_mul_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_add_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_add_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.add_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.add_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_add_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_add_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.add_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.add_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_add_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_add_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.add_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.add_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_sub_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_sub_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.sub_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.sub_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_sub_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_sub_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.sub_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.sub_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_sub_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_sub_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.sub_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.sub_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_mul_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_mul_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_s(2.0);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_s(2.0); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_mul_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_mul_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_s(2.0);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_s(2.0); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_mul_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_mul_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.mul_s(2.0);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.mul_s(2.0); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_div_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_div_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.div_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.div_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_div_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_div_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.div_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.div_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_div_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_div_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.div_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.div_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_rem_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_rem_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.rem_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.rem_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_rem_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_rem_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.rem_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.rem_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_rem_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_rem_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.rem_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.rem_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_neg_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_neg_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.neg_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.neg_self(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_neg_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_neg_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.neg_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.neg_self(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_neg_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_neg_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.neg_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.neg_self(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_div_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_div_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.div_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.div_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_div_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_div_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.div_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.div_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_div_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_div_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.div_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.div_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_rem_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_rem_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.rem_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.rem_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_rem_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_rem_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.rem_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.rem_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_rem_self_s(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_rem_self_s(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.rem_self_s(2.);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.rem_self_s(2.); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_mul_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_mul_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.mul_self_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.mul_self_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_mul_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_mul_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.mul_self_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.mul_self_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_mul_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_mul_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.mul_self_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.mul_self_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_add_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_add_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.add_self_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.add_self_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_add_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_add_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.add_self_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.add_self_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_add_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_add_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.add_self_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.add_self_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_sub_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_sub_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.sub_self_m(&matrix2::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.sub_self_m(&matrix2::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_sub_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_sub_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.sub_self_m(&matrix3::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.sub_self_m(&matrix3::B); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_sub_self_m(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_sub_self_m(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.add_self_m(&matrix4::B);
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.add_self_m(&matrix4::B); })
|
||||
}
|
||||
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_transpose(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_transpose(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.transpose();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.transpose(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_transpose(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_transpose(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.transpose();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.transpose(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_transpose(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_transpose(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a = matrix_a.transpose();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a = matrix_a.transpose(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix2_transpose_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix2_transpose_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix2::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.transpose_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.transpose_self(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix3_transpose_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix3_transpose_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix3::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.transpose_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.transpose_self(); })
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn bench_matrix4_transpose_self(b: &mut extra::test::BenchHarness) {
|
||||
fn bench_matrix4_transpose_self(b: &mut Bencher) {
|
||||
let mut matrix_a = matrix4::A.clone();
|
||||
b.iter(|| {
|
||||
for _ in range(0, 1000) {
|
||||
matrix_a.transpose_self();
|
||||
}
|
||||
})
|
||||
b.iter(|| { matrix_a.transpose_self(); })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue