|
EllAlgo 1.6.13
|
Branch prediction macros for performance optimization. More...
Go to the source code of this file.
Macros | |
| #define | ELL_LIKELY(x) (!!(x)) |
| Hint that the expression is likely to be true. | |
| #define | ELL_UNLIKELY(x) (!!(x)) |
| Hint that the expression is unlikely to be true. | |
Branch prediction macros for performance optimization.
This header provides macros for giving hints to the compiler about the likelihood of certain conditions being true or false. This can help the CPU generate more efficient code by optimizing branch prediction.
Hint that the expression is likely to be true.
This macro tells the compiler that the expression is likely to evaluate to true, allowing it to optimize the generated code for the common case.
| x | The expression to evaluate |
Hint that the expression is unlikely to be true.
This macro tells the compiler that the expression is unlikely to evaluate to true, allowing it to optimize the generated code for the uncommon case. This is typically used for error conditions or exceptional paths.
| x | The expression to evaluate |