#![feature(test)] extern crate test; extern crate recaman; use recaman::Recaman; #[bench] fn sum_to_hundred(b: &mut test::Bencher) { b.iter(|| { let r = Recaman::new(); assert_eq!(7496, r.take(100).sum::()) }) } #[bench] fn sum_to_half_million(b: &mut test::Bencher) { b.iter(|| { let r = Recaman::new(); assert_eq!(53001507296, r.take(250_000).sum::()) }) }