summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-06-27 16:10:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-27 16:10:17 +0000
commitc344f3872918f026026ddab0fdc6bb0ef0a5b4d0 (patch)
tree0ea4ea0a3de92962a37f30cff8e8a27e4c5f3f13 /regexec.c
parente348be647728276e631aaeacbb83b6583aa52129 (diff)
downloadperl-c344f3872918f026026ddab0fdc6bb0ef0a5b4d0.tar.gz
Cure some of the slowness of
[ID 20020627.001] regex and utf-8 performance problem. p4raw-id: //depot/perl@17370
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index edbcd2580d..0c45fd011f 100644
--- a/regexec.c
+++ b/regexec.c
@@ -431,7 +431,8 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
);
});
- if (prog->minlen > CHR_DIST((U8*)strend, (U8*)strpos)) {
+ /* CHR_DIST() would be more correct here but it makes things slow. */
+ if (prog->minlen > strend - strpos) {
DEBUG_r(PerlIO_printf(Perl_debug_log,
"String too short... [re_intuit_start]\n"));
goto fail;