r/programming • • Sep 03 '26

Branch‑Avoidant Programming

https://easylang.online/blog/branchless
254 Upvotes

92 comments sorted by

View all comments

Show parent comment

5

u/sacheie Sep 03 '26

Aren't there situations where having any branches at all will prevent the compiler from doing vectorization?

5

u/meamZ Sep 03 '26

sure there probably are but it just really depends. Relying on auto-vectorization is risky business anyway... There are so many subtile things that can make code not auto-vectorizable...