Quote Originally Posted by JumpingJack View Post
Yeah, there is lots of literature on in the branch predictors for both K10 and Core...
Do you have a good link about K10?

About code that needs speed and branches. The general rule is to avoid branches as much as you can. There are numerous ways to do that. It will be harder for the compiler to optimize code also if there is a lot of branches. I don't think games has a lot of branches, logically it would be the opposite. There is a lot of talks looking at game code how to avoid branches.
If you need a branches then try to have one single flow and avoiding moving the instruction pointer with a conditional branch.