Article
A tale of two greps
Article first published online: 30 OCT 2006
DOI: 10.1002/spe.4380181105
Copyright © 1988 John Wiley & Sons, Ltd
Additional Information
How to Cite
Hume, A. (1988), A tale of two greps. Softw: Pract. Exper., 18: 1063–1072. doi: 10.1002/spe.4380181105
Publication History
- Issue published online: 30 OCT 2006
- Article first published online: 30 OCT 2006
- Manuscript Revised: 26 MAY 1988
- Manuscript Received: 11 JAN 1988
- Abstract
- References
- Cited By
Keywords:
- Pattern matching;
- Tuning;
- Regular expression;
- Algorithm engineering
Abstract
Text searching programs such as the UNIX system tools grep and egrep require more than just good algorithms; they need to make efficient use of system resources such as I/O. I describe improving the I/O management in grep and egrep by using a new fast I/O library fio to replace the normal I/O library stdio. I also describe incorporating the Boyer-Moore algorithm into egrep; egrep is now typically 8–10 (for some common patterns 30–40) times faster than grep.

1097-024X/asset/olbannerleft.jpg?v=1&s=2d7d001211f2c40f177a231141601e9f52afc1f3)
1097-024X/asset/olbannerright.jpg?v=1&s=3aec7891a8ba78b361ead9743adfc0b6eae6369a)
1097-024X/asset/cover.gif?v=1&s=5a70ecca2928358eca4ff75b9921d0552ffb6539)