4 ms·
That's a vast underestimate. Putting in lfence before every branch is on the order of 10X slowdown.
by titzer 1y ago
That's a vast underestimate. Putting in lfence before every branch is on the order of 10X slowdown.
- grumbelbart2 1y agoThere is of course a slight chicken-egg-thing here: If there was no (dynamic) branch prediction, we (as in compilers) would emit different code that is faster for non-predicting CPUs (and presumably slower for predicting CPUs). That would mitigate a bit of that 10x.
- anyfoo 1y agoA bit. I think we've shown time and time again that letting the compiler do what the CPU is doing doesn't work out, most recently with Itanium.
- thesz 1y agoThe issue is with indirect branches. Most branches are direct ones.