1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

some parser optimizations, xmllint --memory --timing --repeat --stream

* dict.c parser.c xmlstring.c: some parser optimizations,
  xmllint --memory --timing --repeat --stream ./db10000.xml
  went down from 16.5 secs to 15.5 secs.
Daniel
This commit is contained in:
Daniel Veillard
2004-01-12 16:24:34 +00:00
parent 65765284fb
commit c82c57e69c
4 changed files with 103 additions and 17 deletions

View File

@@ -208,11 +208,16 @@ xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) {
if (str1 == str2) return(0);
if (str1 == NULL) return(-1);
if (str2 == NULL) return(1);
#ifdef __GNUC__
tmp = strncmp(str1, str2, len);
return tmp;
#else
do {
tmp = *str1++ - *str2;
if (tmp != 0 || --len == 0) return(tmp);
} while (*str2++ != 0);
return 0;
#endif
}
static const xmlChar casemap[256] = {