News for hackers. Stuff that matters.
Re:AMD ships microcode update to disable some branch prediction by Asdfbla on Friday January 05, 2018 @07:27PM (#16082995)
A for loop also is an implicit branch, by the way. At least it will be compiled to something with a conditional jump.

So being unsure about how many times you want to do a thing is a no-go too.

Re:AMD ships microcode update to disable some branch prediction by pertymcpert on Friday January 05, 2018 @09:04PM (#16083419)
Not if it's a known constant trip count, then you can fully unroll it. No more branches!

If the trip count isn't known at compile time? You should find out.