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:
@@ -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] = {
|
||||
|
Reference in New Issue
Block a user