It would depend on the size of the file and how the file was written. If the file is relatively small (less than 100 meg or so) and the computer has lots of free ram then reading the file into memory and searching would be the fastest.
If each record of the file contains multiple fields, such as name, age, street, city, zip etc. etc, then a fix-length binary file can be read a lot faster than a simple text file becuse an entire record can be read at one time. And if the file is already sorted by the search field then you can use binary search algorithms on it. But sorting the file before searching would probably not be very efficient unless there were multiple searches on the same field.