Function pew::do_not_optimize
[−]
[src]
pub fn do_not_optimize<T>(val: T)
This method forces the compiler to not optimize the return statement of a benchmark.
Examples
fn bm_simple(state: &mut State<u64>) { pew::do_not_optimize(5 + 10); } ```
TODO: Conditionally compile this only on nightly so the rest of the benchmark crate can be used
in stable.