6 ms·
Let's say the array is 1m elements... the "ifs" inside the loop will be correctly predicted for cases 2..999,999 the processing is not "blind" to the new spec
by lucio 8y ago
Let's say the array is 1m elements...
the "ifs" inside the loop will be correctly predicted for cases 2..999,999
the processing is not "blind" to the new special case: "the array is padded", the loop is 1..size-1, which I think it's an error. Shouldn't be 1..size-2?
- gdy 8y agoThere are three dots in the range, not two. 1...size-1 == 1..size-2