Fgrep need not be slow (was Re: Fast file scan)
Greg Calkin
greg at tcnz2.tcnz.co.nz
Wed Oct 10 06:38:22 AEST 1990
In article jtc at van-bc.wimsey.bc.ca (J.T. Conklin) writes:
>In article tif at doorstop.austin.ibm.com (Paul Chamberlain) writes:
>>Fgrep means Fixed, egrep means Exponential (like in Exponentially faster)!
>>If you care one tiny bit about the speed you'll only use fgrep when you
>>have to. Now can we stop discussing the fastest way to use fgrep?
>>
>>This lesson is a review for those that didn't believe it the first time.
>
>As has been mentioned before, it depends on your implementation: not
>all fgreps are slow.
Quite correct - in the NCR tower documentation, you get
An eqrep pattern is a full regular expression; egrep uses a fast
deterministic algorithm that sometimes needs exponential space. Fgrep
patterns are fixed strings; fgrep is fast and compact.
My testing in the past has born this out - for simple tasks, fgrep is much
quicker.
So, this lesson is a review for those that believe that all Unixes are the
same. RTFM and experiment.
--
Greg Calkin, Systems Engineer {include "sexual_hard_sell"} (greg at tcnz.co.nz)
Thomas Cook N.Z. Limited, PO Box 24, Auckland CPO, New Zealand, Ph (09)-793920
Disclaimer : Would you buy a used car from someone with these opinions ?
More information about the Comp.unix.misc
mailing list