bug-grep
[Top][All Lists]
Advanced

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

bug#18777: [PATCH] dfa: improvement for checking of multibyte character


From: Paul Eggert
Subject: bug#18777: [PATCH] dfa: improvement for checking of multibyte character boundary
Date: Wed, 17 Dec 2014 09:46:09 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

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.





reply via email to

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