tng         2002/11/28 09:39:02

  Modified:    c/src/xercesc/util XMLUTF8Transcoder.cpp
  Log:
  Performance: it seems we can use *srcPtr directly instead of assigning it to 
firstByte first.   This is to reduce some instruction counts.
  
  Revision  Changes    Path
  1.3       +4 -8      xml-xerces/c/src/xercesc/util/XMLUTF8Transcoder.cpp
  
  Index: XMLUTF8Transcoder.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLUTF8Transcoder.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLUTF8Transcoder.cpp     4 Nov 2002 15:22:05 -0000       1.2
  +++ XMLUTF8Transcoder.cpp     28 Nov 2002 17:39:02 -0000      1.3
  @@ -169,20 +169,16 @@
       //
       while ((srcPtr < srcEnd) && (outPtr < outEnd))
       {
  -        // Get the next leading byte out
  -        const XMLByte firstByte = *srcPtr;
  -
           // Special-case ASCII, which is a leading byte value of <= 127
  -        if (firstByte <= 127)
  +        if (*srcPtr <= 127)
           {
  -            *outPtr++ = XMLCh(firstByte);
  -            srcPtr++;
  +            *outPtr++ = XMLCh(*srcPtr++);
               *sizePtr++ = 1;
               continue;
           }
   
           // See how many trailing src bytes this sequence is going to require
  -        const unsigned int trailingBytes = gUTFBytes[firstByte];
  +        const unsigned int trailingBytes = gUTFBytes[*srcPtr];
   
           //
           //  If there are not enough source bytes to do this one, then we
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to