[PATCH] speedup matching of ^$ and cleanup some code in regex

Paolo Bonzini bonzini@gnu.org
Fri Apr 25 13:41:00 GMT 2008


Carlos O'Donell wrote:
> On Thu, Apr 24, 2008 at 10:57 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>  However, some complications in building the NFA prevent this from fixing
>> the problem. Therefore, this patch cleans up the handling of anchors so that
>> tests on type == ANCHOR are not necessary anymore. When creating the NFA
>> (calc_first), I move the opr.ctx_type to the constraint field of re_token_t,
>> and then I always look at it unconditionally, without special-casing
>> ANCHORs. This also allows some simplification of duplicate_node_closure.
>>
>>  Patch at http://sourceware.org/bugzilla/attachment.cgi?id=2690&action=view
> 
> Paolo,
> 
> Please remember to reference the original BZ #, in this case:
> http://sourceware.org/bugzilla/show_bug.cgi?id=6395
> 
> What testing have you done to verify functionality is preserved?

I ran the sed testsuite, and the version of the glibc testsuite that is 
in sed.  Plus obviously performance testing on ^$ itself.

Paolo



More information about the Libc-alpha mailing list