From owner-freebsd-current@FreeBSD.ORG Sat Jun 25 17:26:02 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA3661065676; Sat, 25 Jun 2011 17:26:02 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 315EF8FC1B; Sat, 25 Jun 2011 17:26:02 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 9C8B614E5922; Sat, 25 Jun 2011 19:26:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tQaY6ROxLlmC; Sat, 25 Jun 2011 19:25:55 +0200 (CEST) Received: from [193.137.158.200] (unknown [193.137.158.200]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 9D86A14E5850; Sat, 25 Jun 2011 19:25:55 +0200 (CEST) Message-ID: <4E061A25.2000605@FreeBSD.org> Date: Sat, 25 Jun 2011 18:25:57 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pt-PT; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Chris Rees References: <4E05E7EC.9000902@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: [CFT] patch to replace the regex code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2011 17:26:02 -0000 > Forgive me if I'm patronizing, but is there any surprise that a POSIX > NFA implementation is slower than grep's DFA? > Oh, of course an NFA implementation will always be slightly slower but the memory footprint will also be smaller, which is a big advantage for embedded systems. But in this case, the basis of the comparison was not the GNU DFA implementation but the old libc-regex. At the moment, BSD grep in the base system uses the GNU regex engine but I built a local version for testing purposes that used libc-regex. Gabor