mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
15 lines
231 B
Rust
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) {}
|