This crates brings likely and unlikely branch prediction hints to stable rust
use ;
use random;
if likely else
It also provides if_likely and if_unlikely for branch prediction
for if let statements.
use if_likely;
use random;
let v = Some.filter;
if_likely!;
Moreover traits LikelyBool, LikelyOption and LikelyResult provides likely
and unlikely versions of the methods commonly used for types bool, Option and
Result
use LikelyOption;
use random;
let v = Some.filter;
v.map_or_else_likely;
Usage
Add this to your Cargo.toml:
[]
= "0.1"