He does not talk about it. It says it can easily make code slower . This means that in certain situations it can make the code slower. In other situations, it can make the code faster.
Alignment slows down the code:
- increases the size of the code, so the likelihood that the code is not in the cache is higher.
- added
nop code slowdown operations
Alignment can lead to quick code execution: branch prediction, fetching commands and god-knows-what.
In the case of one if it is difficult to say which effect is stronger. It depends on the conditions.
However, for a loop, usually the code gets faster. What for? Since slow factors occur only once, but each cycle of the cycle will be faster.
(My GCC seems to align labels to 8)
geza
source share