Open
Description
This is a tracking issue for the #[bench]
attribute and its stability in the compiler. Currently it is not possible to use this from stable Rust as it requires extern crate test
which is itself not stable.
Core APIs for benchmarking:
#[bench]
, which means the function should take a&mut Bencher
argument and will be run as part of regular tests (and specifically benchmarked with --bench passed to the test binary).
crate test {
mod bench {
#[derive(Clone)]
struct Bencher { ... }
impl Bencher {
fn iter<T, F>(&mut self, inner: F)
where
F: FnMut() -> T;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment