Tag

likely

0 views collected around this technical thread.

IT Services Circle
IT Services Circle
Apr 1, 2022 · Fundamentals

Using likely/unlikely Macros for Performance Optimization in the Linux Kernel

This article explains how the Linux kernel’s likely and unlikely macros, which wrap GCC’s __builtin_expect, guide branch prediction to improve cache utilization and pipeline efficiency, and demonstrates their impact with sample code and assembly analysis.

C++Linux kernelbranch prediction
0 likes · 7 min read
Using likely/unlikely Macros for Performance Optimization in the Linux Kernel
Refining Core Development Skills
Refining Core Development Skills
Mar 30, 2022 · Fundamentals

Understanding Linux Kernel likely/unlikely Macros for Performance Optimization

This article explains how the Linux kernel's likely and unlikely macros, which wrap __builtin_expect, guide the compiler's branch prediction to improve cache usage and pipeline efficiency, and demonstrates the effect with sample C code and assembly output.

C++KernelLinux
0 likes · 9 min read
Understanding Linux Kernel likely/unlikely Macros for Performance Optimization