MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1w630ne/branchavoidant_programming/p7k8yw3/
r/programming • u/fagnerbrack • Sep 03 '26
92 comments sorted by
View all comments
Show parent comment
82
To be fair, the first line of the article says "avoiding branch mispredictions", which is more accurate. But yea, even in their example, if the data happens to be sorted it may be perfectly fine.
10 u/Nicksaurus Sep 03 '26 As always, the real answer is to know your data and optimise for it
10
As always, the real answer is to know your data and optimise for it
View all comments
Show parent comment
82
u/jdehesa Sep 03 '26
To be fair, the first line of the article says "avoiding branch mispredictions", which is more accurate. But yea, even in their example, if the data happens to be sorted it may be perfectly fine.