Revision: 1238
http://vcs.pcre.org/viewvc?view=rev&revision=1238
Author: ph10
Date: 2013-01-05 16:27:59 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Small tweaks give performance improvements.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_exec.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2013-01-01 21:41:23 UTC (rev 1237)
+++ code/trunk/ChangeLog 2013-01-05 16:27:59 UTC (rev 1238)
@@ -21,6 +21,10 @@
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
Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c 2013-01-01 21:41:23 UTC (rev 1237)
+++ code/trunk/pcre_exec.c 2013-01-05 16:27:59 UTC (rev 1238)
@@ -3439,8 +3439,7 @@
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 (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 @@
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();