rust/benches/fibonacci.rs
Matthias Krüger bcc491a6ba clippy fixes
clippy::redundant_closure
clippy::unnecessary_mut_passed
clippy::single_char_pattern
clippy::clone_on_copy
clippy::into_iter_on_ref
clippy::extra_unused_lifetimes
2022-06-04 17:10:32 +02:00

27 lines
515 B
Rust

#![feature(test, rustc_private)]
extern crate test;
use crate::test::Bencher;
mod helpers;
use crate::helpers::*;
#[bench]
fn fib(bencher: &mut Bencher) {
bencher.iter(fibonacci_helper::main)
}
#[bench]
fn fib_miri(bencher: &mut Bencher) {
miri_helper::run("fibonacci_helper", bencher);
}
#[bench]
fn fib_iter(bencher: &mut Bencher) {
bencher.iter(fibonacci_helper_iterative::main)
}
#[bench]
fn fib_iter_miri(bencher: &mut Bencher) {
miri_helper::run("fibonacci_helper_iterative", bencher);
}