rust/tests/run-make/test-benches/smokebench.rs
2023-01-11 09:32:08 +00:00

15 lines
231 B
Rust

#![feature(test)]
extern crate test;
#[bench]
fn smoke_yesiter(b: &mut test::Bencher) {
let mut i = 0usize;
b.iter(|| {
i = i.wrapping_add(1);
i
})
}
#[bench]
fn smoke_noiter(_: &mut test::Bencher) {}