Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: Why fgrep? Message-ID: <5025@bsu-cs.UUCP> Date: 8 Dec 88 21:24:35 GMT References: <1050@naucse.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 16 In article <1050@naucse.UUCP> sbw@naucse.UUCP (Steve Wampler) writes: >In every machine I've played with, fgrep has never >performed better than plain old grep for any data I've given >it (and on some machines, it is *considerably* slower). It performs well if you have a large number of strings to look for. For example: cat longfile | fgrep -f stoplist | other_stuff In one experiment on a VAX-11/785 (4.3BSD), with 470 entries in 'longfile' and 20 search strings in 'stoplist', fgrep did it in 2 seconds real time while egrep took 10. User/system cpu times were correspondingly different. -- Rahul Dhesi UUCP:!{iuvax,pur-ee}!bsu-cs!dhesi