GNU bug report logs - #51231
increase performance and usability of binary search with -P

Previous Next

Package: grep;

Reported by: Carlo Arenas <carenas <at> gmail.com>

Date: Sat, 16 Oct 2021 01:29:02 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51231 in the body.
You can then email your comments to 51231 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#51231; Package grep. (Sat, 16 Oct 2021 01:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlo Arenas <carenas <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Sat, 16 Oct 2021 01:29:02 GMT) Full text and rfc822 format available.

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

From: Carlo Arenas <carenas <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: increase performance and usability of binary search with -P
Date: Fri, 15 Oct 2021 17:33:59 -0700
[Message part 1 (text/plain, inline)]
The following patch increase performance of grep when looking at
binary data, without any side effects:

Summary
  'cd grep; ./src/grep -Pc foo
/Users/carlo/Downloads/FreeBSD-13.0-BETA2-amd64.vhd' ran
    1.77 ± 0.02 times faster than 'cd grep.base; ./src/grep -Pc foo
/Users/carlo/Downloads/FreeBSD-13.0-BETA2-amd64.vhd'

Carlo
[0001-pcre-only-match-UTF-8-if-needle-is-UTF-8-and-case-fo.patch (application/octet-stream, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#51231; Package grep. (Sat, 16 Oct 2021 02:28:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Carlo Arenas <carenas <at> gmail.com>
Cc: 51231 <at> debbugs.gnu.org
Subject: Re: bug#51231: increase performance and usability of binary search
 with -P
Date: Fri, 15 Oct 2021 19:27:03 -0700
An all-ASCII pattern can match non-ASCII data. For example, the pattern 
'a.b' can match the string 'aΓb'. So it's not clear to me that the patch 
is correct in general.

For speed, try setting LC_ALL='C'.




Information forwarded to bug-grep <at> gnu.org:
bug#51231; Package grep. (Sat, 16 Oct 2021 07:29:03 GMT) Full text and rfc822 format available.

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

From: Carlo Arenas <carenas <at> gmail.com>
To: 51231 <at> debbugs.gnu.org
Subject: disregard patch
Date: Fri, 15 Oct 2021 18:59:49 -0700
And of course it has side effects (as shown by the test suite), and
would only help (if fixed) when the needle is a fixed string, which is
3x slower than doing -F, -G or -E.

Apologies for the distraction.

Carlo




bug closed, send any further explanations to 51231 <at> debbugs.gnu.org and Carlo Arenas <carenas <at> gmail.com> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sat, 16 Oct 2021 07:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-grep <at> gnu.org:
bug#51231; Package grep. (Sat, 16 Oct 2021 16:45:02 GMT) Full text and rfc822 format available.

Message #16 received at 51231-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Carlo Arenas <carenas <at> gmail.com>
Cc: 51231-done <at> debbugs.gnu.org
Subject: Re: bug#51231: disregard patch
Date: Sat, 16 Oct 2021 09:44:02 -0700
tags 51231 notabug
stop

On Sat, Oct 16, 2021 at 12:29 AM Carlo Arenas <carenas <at> gmail.com> wrote:
> And of course it has side effects (as shown by the test suite), and
> would only help (if fixed) when the needle is a fixed string, which is
> 3x slower than doing -F, -G or -E.
>
> Apologies for the distraction.

Marking this as "notabug" via first lines above and (via the "-done"
in recipient of 51231-done <at> debbugs.gnu.org) closing the issue.




Added tag(s) notabug. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sat, 16 Oct 2021 16:50:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 14 Nov 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 162 days ago.

Previous Next


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