4 ms·
Branch predictors have for years been accurate enough that the right thing is to not worry about a pipeline flush until you actually encounter a high miss rate.
by nknight 15y ago
Branch predictors have for years been accurate enough that the right thing is to not worry about a pipeline flush until you actually encounter a high miss rate.
By the way, on the latest CPUs, they're not just "cheap" -- cmp is actually as low as 0.5 cycles, and a predicted jcc is effectively 0. The comparison is actually between something that, in the absolute best case, is 5.5 cycles, vs. something that, in the general case, is 0.5 cycles.