GNU grep is based on a fast lazy-state deterministic matcher (about twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper search for a fixed string that eliminates impossible text from being considered by the full regexp matcher without necessarily having to look at every character. The result is typically many times faster than Unix grep or egrep.
|Operating Systems||POSIX BSD GNU/Hurd HP-UX IRIX Linux Other SCO Solaris|
Release Notes: "grep -P" can now use a just-in-time compiler to greatly speed up matches, assuming proper support from PCRE. Several multi-byte issues where resolved. Handling of very long lines on systems with a deficient read system call was improved.
Release Notes: Several false results of "grep -i '^$'" in multi-byte locales were resolved. A misdetection of text files as binary was resolved.
Release Notes: Sparse files are now treated as binary by default. Multi-byte locales with mismatching sizes of lower- and uppercase characters are now handled properly. A fix has been made to again allow the combined use of the "--include" and "--exclude" options.
Release Notes: Recursive grep now handles large directory hierarchies much better. The "-R" option now has a long-option alias. The "-r" ("--recursive") option now follows only commandline symbolic links. Several minor bugs have been fixed.
Release Notes: Handling of very long lines as well as very long context line counts for the "-m", "-A", "-B", and "-C" options has been improved, removing some restrictions and avoiding core dumps. Recursive grep ("-r") without a file argument now defaults to using the current directory. The "--include", "--exclude", and "--exclude-dir" options now handle commandline arguments more consistently. More chances for infinite loops have been eliminated. Other minor changes and bugfixes have been made.