Re:AMD's Zen 6 Family: Feeding the Beast
by frankchn on Tuesday November 10, 2026 @05:10PM
(#50446993)
Won't that just stall the pipeline on a modern superscalar core and cause even worse performance?
Re:AMD's Zen 6 Family: Feeding the Beast
by simonask on Tuesday November 10, 2026 @08:23PM
(#50448703)
Yes. I don’t think this person (presumed) knows what a branch predictor does.
Re:AMD's Zen 6 Family: Feeding the Beast
by nukanse on Wednesday November 11, 2026 @01:21AM
(#50450266)
Select my post, right click, press search, and Google ai will explain to you basic stuff about branchless programming that you should know already.
Re:AMD's Zen 6 Family: Feeding the Beast
by nukanse on Wednesday November 11, 2026 @01:19AM
(#50450260)
There are use cases where branch prediction performs better and others where it performs worse. Ask an AI about branchless programming and when it can improve performance. We need both types of CPU instructions to achieve optimal performance.
Re:AMD's Zen 6 Family: Feeding the Beast
by josephg on Tuesday November 10, 2026 @05:11PM
(#50447003)
You've got it the wrong way around. If the branch predictor was 100% accurate, branchless code would have no performance benefit compared to branching code.
> X86 should support no-branch-predict-if
It almost does. You can use __builtin_expect to hint if the branch is predictable - like assertions. Don't annotate conditionals if they're truly unpredictable. The branch predictor will run, but it's not expensive.
Re:AMD's Zen 6 Family: Feeding the Beast
by kevin_thibedeau on Tuesday November 10, 2026 @05:23PM
(#50447144)
You should prefer using the standardized likely/unlikely attributes instead.
X86 should support no-branch-predict-if and dont-predict-goto