GNU bug report logs - #17700
[PATCH] dfa: speed-up for a pattern that many atoms are catenated

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Thu, 5 Jun 2014 11:41:01 UTC

Severity: normal

Tags: patch

Done: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 17700 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Aharon Robbins <arnold <at> skeeve.com>, 17700 <at> debbugs.gnu.org
Subject: Re: bug#17700: [PATCH] dfa: speed-up for a pattern that many atoms
 are catenated
Date: Fri, 06 Jun 2014 07:49:22 +0900
Thanks.

Paul Eggert wrote:
> It seems to me that much of the performance benefit comes from using a
> faster implementation of strstr, and that the DFA code will be better
> off if it simply uses the system strstr rather than rolling its own.

`lookfor' isn't terminated by `\-'\0' in istrstr(), but strstr() requires
it.  So I wasn't replace it to strstr();

after `grep: undo part of previous change', no longer faster.

$ printf '%02048d\n' 0 | time -p src/grep -f - /dev/null

master  : real 5.74  user 5.40  sys 0.17
my patch: real 0.08  user 0.04  sys 0.04





This bug report was last modified 10 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.