This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I think that using strncmp to match backreferences is incorrect because it fails when matching nuls, not to mention inefficient. Also, the return value of memcmp and strncmp is quite `complicated' to compute while we only need a yes/no answer. For this reason the attached patch replaces strncmp with a customized memcmp. Performance improvement is on the order of 5% (2.1 s before, 1.98s after on factor.sed). 2002-10-23 Paolo Bonzini (bonzini@gnu.org) * posix/regexec.c (my_memcmp): new function. Used instead of strncmp throughout the file. |_ _ _ __ |_)(_)| ),' ------- '---
Attachment:
regex-no-strncmp.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |