When the array is sorted then you can use a binary search on the array.
That's quite fast.