java - Why is processing a sorted array faster than processing an unsorted array? - Stack Overflow

PHOTO EMBED

Fri Dec 03 2021 08:22:07 GMT+0000 (UTC)

Saved by @sazzad_sebpo #c++

if (data[c] >= 128)
    sum += data[c];
content_copyCOPY

https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array