docs

你正在阅读 v0.1.0 的文档。Nabi 0.1.0 已不再提供支持。 最新版本:v0.1.3 →

core::hint

API 参考只有英文版,由标准库源代码中的英文文档注释生成。

hints the optimizer honors.

Functions

black_boxSource

pub fn black_box<T>(x: T) -> T

An identity the optimizer cannot see through. Returns x unchanged, but will not fold away the computation that produced it, nor assume the result: x is routed through its own address with a volatile load. Benchmarks wrap the inputs and the result of a timed region with it so the work is actually performed.