From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 14 23:27:55 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5557C1065683 for ; Sat, 14 Jun 2008 23:27:55 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from viefep14-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id 37D258FC24 for ; Sat, 14 Jun 2008 23:27:53 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from [89.134.207.231] by viefep14-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20080614232752.LSFO14514.viefep14-int.chello.at@[89.134.207.231]>; Sun, 15 Jun 2008 01:27:52 +0200 Message-ID: <485453F2.60507@FreeBSD.org> Date: Sun, 15 Jun 2008 01:27:46 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: hackers@FreeBSD.org, current@FreeBSD.org Content-Type: multipart/mixed; boundary="------------060002080405050405040809" Cc: Diomidis Spinellis , "Sean C. Farley" , Max Khon Subject: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 23:27:55 -0000 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: 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 ; 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 ; 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 ; 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 ; 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 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--