diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-01-05 16:27:59 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2013-01-05 16:27:59 +0000 |
commit | 5fc0c88dcf1c0022e996e89b2f72e0f05b2a6a4c (patch) | |
tree | 35aae522f456749cc73a4ecb5e632d2ef14e8516 | |
parent | dff3c63ddf5f19647a0115d05ee708d382be184d (diff) | |
download | pcre-5fc0c88dcf1c0022e996e89b2f72e0f05b2a6a4c.tar.gz |
Small tweaks give performance improvements.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1238 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | pcre_exec.c | 9 |
2 files changed, 7 insertions, 6 deletions
@@ -21,6 +21,10 @@ Version 8.33 xx-xxxx-201x a specific Windows environment. Testing on Linux did also appear to show some benefit (and it is clearly not harmful). Also fixed the definition of Xop which should be unsigned. + +5. Related to (4), changing the definition of the intermediate variable cc + in repeated character loops from pcre_uchar to pcre_uint32 also gave speed + improvements. Version 8.32 30-November-2012 diff --git a/pcre_exec.c b/pcre_exec.c index 6f991f9..860b81e 100644 --- a/pcre_exec.c +++ b/pcre_exec.c @@ -3439,8 +3439,7 @@ for (;;) for (i = 1; i <= min; i++) { - pcre_uchar cc; - + pcre_uint32 cc; /* Faster than pcre_uchar */ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); @@ -3455,8 +3454,7 @@ for (;;) { for (fi = min;; fi++) { - pcre_uchar cc; - + pcre_uint32 cc; /* Faster than pcre_uchar */ RMATCH(eptr, ecode, offset_top, md, eptrb, RM24); if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max) RRETURN(MATCH_NOMATCH); @@ -3476,8 +3474,7 @@ for (;;) pp = eptr; for (i = min; i < max; i++) { - pcre_uchar cc; - + pcre_uint32 cc; /* Faster than pcre_uchar */ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); |