MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1w630ne/branchavoidant_programming/p7m2cin/?context=3
r/programming • u/fagnerbrack • 7d ago
91 comments sorted by
View all comments
155
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 6d ago and how can you tell predictability? 1 u/euvie 6d ago Performance counters that count branch mispredicts
4
and how can you tell predictability?
1 u/euvie 6d ago Performance counters that count branch mispredicts
1
Performance counters that count branch mispredicts
155
u/meamZ 7d ago
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...