[Pcre-svn] [1257] code/trunk: Change some pcre_uchar variabl…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1257] code/trunk: Change some pcre_uchar variables to pcre_uint32 in pcre_exec.c, for better
Revision: 1257
          http://vcs.pcre.org/viewvc?view=rev&revision=1257
Author:   ph10
Date:     2013-02-22 20:20:30 +0000 (Fri, 22 Feb 2013)


Log Message:
-----------
Change some pcre_uchar variables to pcre_uint32 in pcre_exec.c, for better
performance.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_exec.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2013-02-22 17:16:28 UTC (rev 1256)
+++ code/trunk/ChangeLog    2013-02-22 20:20:30 UTC (rev 1257)
@@ -73,7 +73,10 @@


18. Added some #ifdef __VMS code into pcretest.c to help VMS implementations.

+19. Redefined some pcre_uchar variables in pcre_exec.c as pcre_uint32; this 
+    gives some modest performance improvement in 8-bit mode.


+
Version 8.32 30-November-2012
-----------------------------


Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c    2013-02-22 17:16:28 UTC (rev 1256)
+++ code/trunk/pcre_exec.c    2013-02-22 20:20:30 UTC (rev 1257)
@@ -233,7 +233,7 @@
     {
     while (length-- > 0)
       {
-      pcre_uchar cc, cp;
+      pcre_uint32 cc, cp;
       if (eptr >= md->end_subject) return -2;   /* Partial match */
       cc = RAWUCHARTEST(eptr);
       cp = RAWUCHARTEST(p);
@@ -3215,7 +3215,7 @@


       if (fc < 128)
         {
-        pcre_uchar cc = RAWUCHAR(eptr);
+        pcre_uint32 cc = RAWUCHAR(eptr);
         if (md->lcc[fc] != TABLE_GET(cc, md->lcc, cc)) RRETURN(MATCH_NOMATCH);
         ecode++;
         eptr++;
@@ -4452,8 +4452,7 @@
         case OP_DIGIT:
         for (i = 1; i <= min; i++)
           {
-          pcre_uchar cc;
-
+          pcre_uint32 cc;
           if (eptr >= md->end_subject)
             {
             SCHECK_PARTIAL();
@@ -4470,8 +4469,7 @@
         case OP_NOT_WHITESPACE:
         for (i = 1; i <= min; i++)
           {
-          pcre_uchar cc;
-
+          pcre_uint32 cc;
           if (eptr >= md->end_subject)
             {
             SCHECK_PARTIAL();
@@ -4488,8 +4486,7 @@
         case OP_WHITESPACE:
         for (i = 1; i <= min; i++)
           {
-          pcre_uchar cc;
-
+          pcre_uint32 cc;
           if (eptr >= md->end_subject)
             {
             SCHECK_PARTIAL();
@@ -4506,8 +4503,7 @@
         case OP_NOT_WORDCHAR:
         for (i = 1; i <= min; i++)
           {
-          pcre_uchar cc;
-
+          pcre_uint32 cc;
           if (eptr >= md->end_subject)
             {
             SCHECK_PARTIAL();
@@ -4524,8 +4520,7 @@
         case OP_WORDCHAR:
         for (i = 1; i <= min; i++)
           {
-          pcre_uchar cc;
-
+          pcre_uint32 cc;
           if (eptr >= md->end_subject)
             {
             SCHECK_PARTIAL();