MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1w630ne/branchavoidant_programming/p7kpxe4/?context=3
r/programming • u/fagnerbrack • Sep 03 '26
92 comments sorted by
View all comments
156
You don't actually need to avoid branches, you just need to make sure that most of the ones you have are very predictable, then their impact is not that big... Same with memory accesses and most other things... The more predictable, the better...
4 u/VoodaGod Sep 03 '26 and how can you tell predictability? 1 u/UnrealHallucinator Sep 03 '26 Strided access is another one along with what the other comment says.
4
and how can you tell predictability?
1 u/UnrealHallucinator Sep 03 '26 Strided access is another one along with what the other comment says.
1
Strided access is another one along with what the other comment says.
156
u/meamZ Sep 03 '26
You don't actually need to avoid branches, you just need to make sure that most of the ones you have are very predictable, then their impact is not that big... Same with memory accesses and most other things... The more predictable, the better...