Skip to main content

Module hint

Module hint 

1.27.0 · Source
Expand description

Hints to compiler that affects how code should be emitted or optimized.

Hints may be compile time or runtime.

Functions§

assert_unchecked
Makes a soundness promise to the compiler that cond holds.
select_unpredictable
Returns either true_val or false_val depending on the value of condition, with a hint to the compiler that condition is unlikely to be correctly predicted by a CPU’s branch predictor.
unreachable_unchecked
Informs the compiler that the site which is calling this function is not reachable, possibly enabling further optimizations.