Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site stride.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!utah-cs!utah-gr!stride!bruce From: bruce@stride.UUCP (Bruce Robertson) Newsgroups: net.unix,net.bugs.usg Subject: Re: fgrep (isn't) Message-ID: <501@stride.UUCP> Date: Thu, 11-Jul-85 14:34:42 EDT Article-I.D.: stride.501 Posted: Thu Jul 11 14:34:42 1985 Date-Received: Sat, 13-Jul-85 14:33:50 EDT References: <495@unisoft.UUCP> Reply-To: bruce@stride.UUCP (Bruce Robertson) Distribution: net Organization: Stride Micro, Reno, NV Lines: 42 Xref: watmath net.unix:5027 net.bugs.usg:251 In article <495@unisoft.UUCP> fnf@unisoft.UUCP writes: > >After grabbing the bgrep distribution off of mod.sources recently >I decided to try a quick test of the various grep's on one our system >V release 2 ports: > > trial 1 trial 2 trial 3 > real user sys real user sys real user sys > ---- ---- --- ---- ---- --- ---- ---- --- > >grep 1.9 1.1 0.6 1.8 1.1 0.6 1.8 1.1 0.6 >bgrep 2.7 1.9 0.7 2.3 1.4 0.7 4.9 3.9 0.7 >egrep 3.5 2.6 0.7 3.6 2.8 0.6 3.5 2.7 0.6 >fgrep 9.6 8.8 0.7 9.7 9.0 0.6 9.8 8.9 0.7 Here are my results of the same benchmarks: trial 1 trial 2 trial 3 real user sys real user sys real user sys ---- ---- --- ---- ---- --- ---- ---- --- grep 1.7 1.3 0.3 1.7 1.3 0.3 1.6 1.3 0.3 bm 0.5 0.1 0.3 0.8 0.4 0.7 1.3 0.9 0.3 egrep 1.7 1.2 0.3 1.7 1.2 0.3 1.7 1.3 0.4 fgrep 1.5 1.0 0.4 1.4 1.0 0.3 1.4 1.0 0.4 My results are more what I would expect to see. I used bm, because I ported that one, and not bgrep. As you can see, bm is MUCH faster than all of the others, and 'fgrep' is marginally faster than grep. These were run on a Stride Micro 460 computer, which is 68000 based at 10 MHz with no wait states, running the Motorola System-V/68 version of Unix, which is System V release 1. The file used for the test was the first 51000 bytes of /etc/termcap. I'm not sure why your times are so large, especially for egrep, but I'd take a close look at your C compiler and see what code it's generating. -- Bruce Robertson UUCP: {ucbvax!menlo70,seismo}!unr70!unrvax!stride!bruce