commit | 24072c0256a520408575416fe8706667b576ff99 | [log] [tgz] |
---|---|---|
author | Benjamin Kramer <benny.kra@googlemail.com> | Tue Jan 26 18:48:36 2010 +0100 |
committer | Junio C Hamano <gitster@pobox.com> | Tue Jan 26 10:44:10 2010 -0800 |
tree | 1155e3fcc4cd65d214fc406e1858f95f283d12eb | |
parent | e3f67d30b20e49d8fc3eefe819808cba7998b060 [diff] |
grep: use REG_STARTEND (if available) to speed up regexec BSD and glibc have an extension to regexec which takes a buffer + length pair instead of a NUL-terminated string. Since we already have the length computed this can save us a strlen call inside regexec. Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>