GNU bug report logs - #17576
[PATCH] dfa: speed-up at initial state

Previous Next

Package: grep;

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

Date: Sat, 24 May 2014 03:33:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 17576 <at> debbugs.gnu.org
Subject: bug#17576: [PATCH] dfa: speed-up at initial state
Date: Fri, 23 May 2014 22:01:36 -0700
Norihiro Tanaka wrote:
> I tested the patch, and got about 3x speed-up.

That, but unfortunately whan I timed that patch against the current grep 
trunk (879d86e6242eae688f9e72d42b230348d1c93a8f), it slowed things down 
on a similar test case (a test like yours, but 100x longer).

$ yes j | head -1000000000 >k
$ env LC_ALL=C time -p src/grep-old '\(a\|b\)' k
real 8.25
user 7.74
sys 0.50
$ env LC_ALL=C time -p src/grep '\(a\|b\)' k
real 11.11
user 10.63
sys 0.46
$ env LC_ALL=ja_JP.eucJP time -p src/grep-old '\(a\|b\)' k
real 8.74
user 8.27
sys 0.43
$ env LC_ALL=ja_JP.eucJP time -p src/grep '\(a\|b\)' k
real 8.95
user 8.44
sys 0.49

This is on my usual platform: Fedora 20 x86-64, AMD Phenum II X4 910e, 
GCC 4.9.0, default (-O2) optimization.




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

Previous Next


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