Ruby 4.1.0dev (2026-10-21 revision 536dc6f98b72e6999a84bb6373562c43cb1ddf8a)
Macros
branch.h File Reference

(536dc6f98b72e6999a84bb6373562c43cb1ddf8a)

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRISM_LIKELY(x)   __builtin_expect(!!(x), 1)
 Branch prediction hints.
 
#define PRISM_UNLIKELY(x)   __builtin_expect(!!(x), 0)
 The compiler should predicate that this branch will not be taken.
 

Macro Definition Documentation

◆ PRISM_LIKELY

#define PRISM_LIKELY (   x)    __builtin_expect(!!(x), 1)

Branch prediction hints.

These tell the compiler which side of a branch to predicate the fast path through, so it can lay out instructions to favour that side and steer the static branch predictor. The compiler should predicate that this branch will be taken.

Definition at line 14 of file branch.h.

◆ PRISM_UNLIKELY

#define PRISM_UNLIKELY (   x)    __builtin_expect(!!(x), 0)

The compiler should predicate that this branch will not be taken.

Definition at line 17 of file branch.h.