You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sh...@apache.org on 2009/09/08 05:30:22 UTC
svn commit: r812333 -
/webservices/axis2/trunk/c/guththila/src/guththila_xml_parser.c
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
/*