From mboxrd@z Thu Jan 1 00:00:00 1970 From: dot@dotat.at (Tony Finch) Date: Mon, 1 Feb 2016 10:48:04 +0000 Subject: [TUHS] Short history of 'grep' In-Reply-To: <56AE4029.7010701@mhorton.net> References: <20160130030012.GB9762@minnie.tuhs.org> <56AD0AB7.40701@mhorton.net> <56AD1B28.4010908@mhorton.net> <56AE4029.7010701@mhorton.net> Message-ID: Mary Ann Horton wrote: > It's not a typo. > > When I tell this story to nontechical folks, I prefix it with the brief note > that fgrep ought to be fastest, because it's simple, and egrep ought to be > slowest, because it's complex, but in reality fgrep is slowest and egrep is > fastest. Otherwise the story makes no sense. Does fgrep win if you are matching lots of fixed strings? https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm Tony. -- f.anthony.n.finch http://dotat.at/ Trafalgar: North or northwest 4 or 5. Moderate or rough. Fair. Good.