iai_callgrind

Function black_box

source
pub fn black_box<T>(dummy: T) -> T
Available on crate feature default only.
Expand description

DEPRECATED: A function that is opaque to the optimizer

It is used to prevent the compiler from optimizing away computations in a benchmark.

This method is deprecated and is in newer versions of iai-callgrind merely a wrapper around std::hint::black_box. Please use std::hint::black_box directly.