Subject: bug#18454: Improve performance when -P (PCRE) is used in UTF-8 locales

From: Santiago Ruano Rincón <[email-masked]>
Date: Thu, 18 Sep 2014 10:33:27 +0200

El 17/09/14 a las 23:00, Paul Eggert escribió:
> I've installed all the patches mentioned so far.
> 

I've successfully build the latest commit
(f6de00f6cec3831b8f334de7dbd1b59115627457), but I don't see any
performance boost. Rather the opposite.

Comparing with debian's grep 2.20-3, that includes your first patch to solve
this -P issue, 0001-grep-P-invalid-utf8-non-matching.patch:

grep -P asdf /usr/bin/*  12,42s user 0,12s system 99% cpu 12,545 total
src/grep -P asdf /usr/bin/*  14,37s user 0,12s system 99% cpu 14,492 total

Note that basic grep also slowdowns:

grep asdf /usr/bin/*  0,22s user 0,16s system 99% cpu 0,382 total
src/grep asdf /usr/bin/*  1,26s user 0,12s system 99% cpu 1,384 total

Cheers, and thanks for your work,

Santiago