What and Why ?
C likely and unlikely attributes came into existence with the release of C 20.
In our C code if we know which lines of code would most probably be executed during our code execution then we can use likely and unlikely attributes , which is our way of saying to the compiler which lines of code would be most probably be executed and thus compiler can optimize it's execution ( by code scheduling ) and that would result in faster code execution.
Before the release of C 20 we ...
Published on March 08, 2021 08:39