Subject: Othersrc grep versus GNU grep
To: None <tech-userlevel@netbsd.org>
From: Chris Pinnock <cjep@fawlty.net>
List: tech-userlevel
Date: 11/08/2003 18:46:36
--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Here are some outputs from /usr/bin/time running grep tests. The GNU grep
is the stock GNU group in basesrc. The Othersrc grep can be found at
in the othersrc module at cvs.netbsd.org:/cvsroot/othersrc/usr.bin/grep.=20

The tests were done on my system straight after a reboot. The=20
machine is running NetBSD 1.6Y/i386. It has an AMDK6-2 500MHz CPU with=20
384MB RAM.

(Note that OpenBSD has some speedups in their grep for simple REs. I intend
to look at bringing the code across to othersrc grep.)

1. grep halibut /usr/share/dict/words

Othersrc grep version 20031108

real         0.65
user         0.19
sys          0.02
         0  maximum resident set size
         0  average shared memory size
         0  average unshared data size
         0  average unshared stack size
       208  page reclaims
       123  page faults
         0  swaps
         3  block input operations
         0  block output operations
         0  messages sent
         0  messages received
         0  signals received
       126  voluntary context switches
        11  involuntary context switches

GNU grep 2.5.1=20

real         0.48
user         0.00
sys          0.05
         0  maximum resident set size
         0  average shared memory size
         0  average unshared data size
         0  average unshared stack size
        68  page reclaims
         6  page faults
         0  swaps
         3  block input operations
         1  block output operations
         0  messages sent
         0  messages received
         0  signals received
        53  voluntary context switches
         2  involuntary context switches

2. grep -r 386 /usr/src/sys/arch (recent NetBSD current src tree).

Othersrc grep 20031108

real       150.14
user         5.97
sys          6.89
         0  maximum resident set size
         0  average shared memory size
         0  average unshared data size
         0  average unshared stack size
     14520  page reclaims
     24978  page faults
         0  swaps
      2474  block input operations
       408  block output operations
         0  messages sent
         0  messages received
         0  signals received
     27447  voluntary context switches
       217  involuntary context switches

GNU grep 2.5.1

real       145.78
user         1.65
sys          8.24
         0  maximum resident set size
         0  average shared memory size
         0  average unshared data size
         0  average unshared stack size
      1673  page reclaims
         6  page faults
         0  swaps
      2474  block input operations
       985  block output operations
         0  messages sent
         0  messages received
         0  signals received
     25773  voluntary context switches
       104  involuntary context switches


--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/rToLloMtOdQmpCwRAkxqAJ9GtJAF1Pha8x/FyUJnepaPISjC1wCfe6Vy
ze2dS3WJMMJvXcyIhOsFk40=
=7t0D
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--