The first thing to do is to write something that achieves your desired result.
Then use a profiler to determine what is taking the longest time!
Once you've found the bit that takes the longest time, see if there's any way to improve that.
Now, from your question, I can probably determine that the bit that's going to take the longest will be the transfer of the data from the hard drive to RAM. If the file contains different data each time you search it then this will define the upper limit of how fast you can do the search. If the file does not change then there's a few possibilities to improve the upper limit.
But first, find out what's taking the time.