GNU bug report logs - #18777
[PATCH] dfa: improvement for checking of multibyte character boundary

Previous Next

Package: grep;

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

Date: Mon, 20 Oct 2014 15:05: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


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Eric Blake <eblake <at> redhat.com>, 18777 <at> debbugs.gnu.org
Subject: Re: bug#18777: [PATCH] dfa: improvement for checking of multibyte
 character boundary
Date: Wed, 17 Dec 2014 09:46:09 -0800
On 12/17/2014 09:21 AM, Norihiro Tanaka wrote:
> If WCP != NULL, all of following code will be pruned, although I think
> that it is ignorable for the performance.
>
>    if (wcp == NULL && always_character_boundary[*p])
>      return p;

Yes, and that's the point: we don't want this if-statement to be pruned 
if WCP != NULL.  We want the code to return P right away in the typical 
case where P is at a character boundary.  If MBP is way less than P, 
this will save the work of the following loop.




This bug report was last modified 9 years and 75 days ago.

Previous Next


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