[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24009: [PATCH] grep: use fastmap in regex

From: Norihiro Tanaka
Subject: bug#24009: [PATCH] grep: use fastmap in regex
Date: Sun, 17 Jul 2016 09:55:00 +0900

On Sat, 16 Jul 2016 22:06:53 +0200 (CEST)
"Jens Schleusener" <address@hidden> 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.

Attachment: 0001-grep-use-fastmap-in-regex.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]