For me as well. Though, somehow I don't seem to encounter situations where improving branch prediction makes an important difference.inetknght wrote:This stack overflow answer was a pretty massive eye opener to me, as far as how much effect the branch predictor can have.
However, dynamic function calls are also branches. Those almost certainly lead to branch prediction failures. Meaning that object oriented programming (OOP) might not be such a smart idea if you're writing game logic that needs to be efficient/fast (i.e. executed >100.000 per second). This chapter about data locality describes an interesting alternative to OOP, which eliminate the whole virtual function calls, while also being cache friendly. It seems that Factorio actually went into this direction with their new implementation of the circuit network: FFF-138 (from a design point of view at least, I don't know about the implementation).