As you've probably noted, association lists implement this kind of searching if we use the first value of a list as the key for that list. Of course, it is also possible to make a get-key procedure a parameter to the search procedure. Otherwise, returns some value for which that holds. The linear search algorithms just described can be quite slow if the data structure to be searched is large. The reason is that one can then use the much faster binary search algorithm.
Binary search is a more specialized algorithm than linear search.
It requires a random-access structure, as opposed to one that offers only sequential access, and it is limited to the kind of test in which one is looking for a particular value that has a unique relative position in some ordering. The idea in a binary search is to divide the sorted vector into two approximately equal parts, examining the element at the point of division to determine which of the parts must contain the value sought. The search procedure invokes itself recursively to search just the left half of the vector. The value sought cannot precede the element at the point of division. The search procedure invokes itself recursively to search just the right half of the vector.