Grep is a command-line utility for searching plain-text data sets for lines that match a regular
expression or simply a string. E.g.
- My grep algorithm performed 32.2% better than the naïve algorithm.
- My grep algorithm is more efficient and faster than naïve.
- Naïve only takes one position movement at each time making it inefficient.
- In my grep algorithm, it does not match characters that we already know will match.
- When naïve finds a position, it does not use it to find another, instead it goes back to the starting point and looks for pattern all over again.
- The grep algorithm reuses the information from the previous shift rather than disregarding it.