GNU bug report logs -
#24009
[PATCH] grep: use fastmap in regex
Previous Next
Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Date: Sat, 16 Jul 2016 16:59:02 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
[Message part 1 (text/plain, inline)]
On Sat, 16 Jul 2016 22:06:53 +0200 (CEST)
"Jens Schleusener" <Jens.Schleusener <at> t-online.de> wrote:
> Wow, that is a spectacular speed improvement. Since I use grep with
> regex patterns heavily in some of my scripts I could not resist to
> make some first simple tests (including your example pattern with a
> back reference). The non-representative results using grep 2.25 shows
> a gain of a factor 5-10 (while the unpatched self-compiled grep 2.25
> itself was already a factor 1.4-2.8 faster than the grep 2.16 offered
> by the OS (OpenSUSE Leap 42.1). At least in my tests all the grep
> outputs were identical.
I believe that cases to speed up by this patch is not so much, as grep
makes a lot of other optimizations. In fact, I spent a little time to
make a test case to demonstrate to speed up by this patch. So I have an
interest with what kind of test cases you could confirm to speed up by
this patch.
> By the way I had to remove one of the two "=" in your patch otherwise
> gcc issued an error (but caution, I am a C-layman).
Thanks, I fixed it. I made a mistake before sending the patch. Of
course, "=" should be one.
[0001-grep-use-fastmap-in-regex.patch (text/plain, attachment)]
This bug report was last modified 8 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.