Re: [PATCH] Speedup matching of ^$ and cleanup

2008-04-11 Thread Bruno Haible
Paolo Bonzini wrote: > I attach a patch for glibc (against CVS), and one for gnulib, asking for > gnulib approval, and glibc approval+commit. For patches like this one, the only requirement that gnulib has and that glibc has not, is C89 compatibility. I don't see declarations after statements in

[PATCH] Speedup matching of ^$ and cleanup

2008-04-11 Thread Paolo Bonzini
Regex matching has an optimization where only one match is tried for a regex anchored to the beginning of the buffer. While other anchors are resolved with the fastmap, this one allows further optimization and is special cased. However, because of a bug in create_cd_newstate, ^$ would be mist