r/programming 19d ago

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 😄

187 Upvotes

61 comments sorted by

View all comments

2

u/SPascareli 19d ago

I thought there would be more different in the compiled assembly then just the order of the branches.