axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r812333 - /webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
Date Tue, 08 Sep 2009 03:30:22 GMT
Author: shankar
Date: Tue Sep  8 03:30:21 2009
New Revision: 812333

URL: http://svn.apache.org/viewvc?rev=812333&view=rev
Log:
improving performance

Modified:
    webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c?rev=812333&r1=812332&r2=812333&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c Tue Sep  8 03:30:21 2009
@@ -169,10 +169,12 @@
 #endif  
 
 /*
- * Return non zero value if the given argument is a space.
+ * Return non zero value if the given argument is a space. (c < 0x21) is added to improve
the
+ * performance. common case is printable characters. and if given character is printable,
we can
+ * return false immediately.
  */
 #ifndef GUTHTHILA_IS_SPACE
-#define GUTHTHILA_IS_SPACE(c) (0x20 == c || 0xD == c || 0xA == c || 0x9 == c)     
+#define GUTHTHILA_IS_SPACE(c) ((c < 0x21) && (0x20 == c || 0xD == c || 0xA ==
c || 0x9 == c))
 #endif  
 
 /*



Mime
View raw message