Date: Sun, 15 Jun 2008 01:27:46 +0200 From: Gabor Kovesdan <gabor@FreeBSD.org> To: hackers@FreeBSD.org, current@FreeBSD.org Cc: Diomidis Spinellis <dds@aueb.gr>, "Sean C. Farley" <scf@FreeBSD.org>, Max Khon <fjoe@samodelkin.net> Subject: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] Message-ID: <485453F2.60507@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------060002080405050405040809
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hello All,
Today I've basically terminated te feature-completion of the
BSD-licensed grep from OpenBSD. It means, that I've accomplished the
following tasks:
- Implement --label
- Implement --null
- Implement --color / --colour
- Implement -D / --devices
- Implement -H / --with-filename
- Implement -J / --bz2decompress
- Implement -d / --directories
- Implement -m / --max-count
- Implement -o / --only-matching
- Add --help
- Eliminate warnings
- style(9) cleanup
I've made some preliminary tests with the fgrep and normal grep
behaviour and it seems that they can achieve the same speed:
/usr/bin/time -h gnugrep -e ^\#define -r /usr/include/
24.06s real 0.11s user 0.17s sys
24.46s real 0.11s user 0.16s sys
24.37s real 0.11s user 0.16s sys
23.73s real 0.09s user 0.19s sys
23.97s real 0.06s user 0.21s sys
/usr/bin/time -h bsdgrep -e ^\#define -r /usr/include/
23.56s real 0.27s user 0.23s sys
23.40s real 0.28s user 0.21s sys
23.64s real 0.30s user 0.18s sys
23.70s real 0.30s user 0.23s sys
23.92s real 0.28s user 0.22s sys
/usr/bin/time -h gnugrep -e int -r /usr/include/
18.44s real 0.10s user 0.14s sys
18.19s real 0.09s user 0.14s sys
18.01s real 0.09s user 0.15s sys
18.10s real 0.10s user 0.14s sys
18.91s real 0.06s user 0.18s sys
/usr/bin/time -h bsdgrep -e int -r /usr/include/
18.39s real 0.12s user 0.19s sys
18.33s real 0.14s user 0.17s sys
18.26s real 0.11s user 0.20s sys
18.07s real 0.10s user 0.21s sys
17.97s real 0.14s user 0.16s sys
What remains is to do more test about the performance and the
compatibility with the GNU version. You can test this version easily by
installing the textproc/bsdgrep port, which creates two symlinks:
bsdgrep points to this version and gnugrep points to the base grep.
Any help and comments are welcome.
Regards,
Gábor Kövedán
P.S.: Acknowledgements are going to Max Khon, who is my mentor in this
program, to Diomidis Spinellis due to the his useful comments and to
Sean C. Farley who worked on this implementation of grep before and
provided some preliminary comments and suggestions before I started
working on this project, and of course, to Google for sponsoring this
piece of work.
--------------060002080405050405040809
Content-Type: message/rfc822;
name="cvs commit: ports/textproc/bsdgrep Makefile distinfo.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename*0="cvs commit: ports/textproc/bsdgrep Makefile distinfo.eml"
Return-Path: <owner-ports-committers@FreeBSD.org>
X-Original-To: gabor@t-hosting.hu
Delivered-To: gabor@t-hosting.hu
Received: from localhost (localhost [127.0.0.1])
by server.mypc.hu (Postfix) with ESMTP id CC3C014D5597
for <gabor@t-hosting.hu>; Sun, 15 Jun 2008 01:06:27 +0200 (CEST)
X-Virus-Scanned: amavisd-new at t-hosting.hu
Received: from server.mypc.hu ([127.0.0.1])
by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id egmI+NSs1Io9 for <gabor@t-hosting.hu>;
Sun, 15 Jun 2008 01:06:25 +0200 (CEST)
Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53])
by server.mypc.hu (Postfix) with ESMTP id 6568714D5595
for <gabor@kovesdan.org>; Sun, 15 Jun 2008 01:06:24 +0200 (CEST)
Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36])
by mx2.freebsd.org (Postfix) with ESMTP id 48CC11520B1
for <gabor@kovesdan.org>; Sat, 14 Jun 2008 23:06:21 +0000 (UTC)
(envelope-from owner-ports-committers@FreeBSD.org)
Received: by hub.freebsd.org (Postfix)
id 4CC5210656BF; Sat, 14 Jun 2008 23:06:21 +0000 (UTC)
Delivered-To: gabor@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 538)
id 31F6D1065672; Sat, 14 Jun 2008 23:06:21 +0000 (UTC)
Delivered-To: ports-committers@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
by hub.freebsd.org (Postfix) with ESMTP id 15C3C106566C;
Sat, 14 Jun 2008 23:06:20 +0000 (UTC)
(envelope-from gabor@FreeBSD.org)
Received: from repoman.freebsd.org (repoman.freebsd.org
[IPv6:2001:4f8:fff6::29])
by mx1.freebsd.org (Postfix) with ESMTP id E04C08FC0C;
Sat, 14 Jun 2008 23:06:19 +0000 (UTC)
(envelope-from gabor@FreeBSD.org)
Received: from repoman.freebsd.org (localhost [127.0.0.1])
by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5EN6JYc089822;
Sat, 14 Jun 2008 23:06:19 GMT
(envelope-from gabor@repoman.freebsd.org)
Received: (from gabor@localhost)
by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5EN6JOo089821;
Sat, 14 Jun 2008 23:06:19 GMT (envelope-from gabor)
Message-Id: <200806142306.m5EN6JOo089821@repoman.freebsd.org>
From: Gabor Kovesdan <gabor@FreeBSD.org>
Date: Sat, 14 Jun 2008 23:06:19 +0000 (UTC)
To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org
Subject: cvs commit: ports/textproc/bsdgrep Makefile distinfo
X-FreeBSD-CVS-Branch: HEAD
Sender: owner-ports-committers@FreeBSD.org
Precedence: bulk
X-Loop: FreeBSD.ORG
gabor 2008-06-14 23:06:19 UTC
FreeBSD ports repository
Modified files:
textproc/bsdgrep Makefile distinfo
Log:
- Update to 20080615
This version is now supposed to be compatible with GNU grep 2.5.1, which
can be found in FreeBSD. According to some preliminary measurements,
they achieve almost the same level of efficiency, this version seem to be
measureably but not significantly faster. Further tests are needed
to test and examine this version of grep.
Revision Changes Path
1.5 +1 -1 ports/textproc/bsdgrep/Makefile
1.5 +3 -3 ports/textproc/bsdgrep/distinfo
--------------060002080405050405040809--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?485453F2.60507>
