Hacker News new | ask | show | jobs
by scatters 3090 days ago
This doesn't affect branches, only indirect jumps (and calls). The performance impact will still be considerable. It will make PGO more crucial (or smarter JITting, for VM languages) since the penalty can be avoided by prefixing an indirect call with a direct call to the most likely target - this is a well-known technique, useful on machines with weaker jump predictors than branch predictors.

Quite possibly, the worst affected code will be OO code that is dynamically (open) polymorphic.

1 comments

FWIW, all branches will need to be followed by a memory load fence which seems to trip up speculative execution on Intel CPUs.