Is there any faster way to search for a string in a file?
Look at this site, where you can also see the matching time for each of the algorithms.