3 ms·
Disclaimer: I don't work in this field, just an enthusiast. As far as I can tell, branch predictors have always been too good for it to be worth it. Moderns CP
by sapiogram 2y ago
Disclaimer: I don't work in this field, just an enthusiast.
As far as I can tell, branch predictors have always been too good for it to be worth it. Moderns CPUs have instruction reorder buffers that are hundreds of instructions deep, so even if only 8 of those instructions are conditional jumps, there's 256 different paths your program could take. If your branch predictor predicts all 8 correctly >50% of the time (It does), doing 256x the work to cover your ass is not worth it.