From: Jarkko Hietaniemi Date: Thu, 27 Jun 2002 16:10:17 +0000 (+0000) Subject: Cure some of the slowness of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c344f3872918f026026ddab0fdc6bb0ef0a5b4d0;p=p5sagit%2Fp5-mst-13.2.git Cure some of the slowness of [ID 20020627.001] regex and utf-8 performance problem. p4raw-id: //depot/perl@17370 --- diff --git a/regexec.c b/regexec.c index edbcd25..0c45fd0 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;