Misprediction Slowdown

An inner loop contains one data-dependent conditional branch:

long sum = 0;
for (int i = 0; i < 100000000; i++)
    if (data[i] >= 128) sum += data[i];

data holds bytes and is already resident in L1d, so memory is not the limit. With data sorted, the branch is predicted correctly essentially every time and the loop sustains 4.8 cycles per iteration. Now data is shuffled into a uniformly random order. Agner Fog's measurements put the misprediction rate of a truly random 50/50 branch at 0.500, and the misprediction penalty on this microarchitecture at 17 cycles.

By what factor does the loop slow down?

A

About 8.50×8.50\times

B

About 2.77×2.77\times

C

About 4.54×4.54\times

D

About 1.77×1.77\times