r/programming • • Aug 22 '26

The unlikely Linux macro

https://rushed-reflections.bearblog.dev/an-unlikely-experiment/

Wrote a bit about the `unlikely` and `likely` macros in the Linux codebase. Great little exploration into tiny optimizations that everyone should know more about πŸ˜„

188 Upvotes

61 comments sorted by

View all comments

Show parent comment

30

u/svk177 Aug 23 '26

The Pentium 4 supported those exact prefixes and were later ignored. Itβ€˜s funny they brought them back.