Hacker News new | past | comments | ask | show | jobs | submit login

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?




There are three dots in the range, not two.

1...size-1 == 1..size-2




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: