Okay time to improve performances, gprof session:
before  real 0m2.483s (2.3.2 release yesterday)
current real 0m1.763s
when parsing (with tree build/freeing) db10000.xml from XSLTMark:
- xmlmemory.h HTMLparser.c HTMLtree.c entities.c parser.c
  xpath.c xpointer.c tree.c uri.c valid.c xinclude.c xmlIO.c:
  avoiding memcpy in production builds MEM_CLEANUP macro use
- parser.[ch] parserInternals.c: optimizations of the tightest
  internal loops inside the parser. Better checking of I/O
  flushing/loading conditions
- xmllint.c : added --timing
Daniel
diff --git a/valid.c b/valid.c
index 1b7e6f6..cbfa5e0 100644
--- a/valid.c
+++ b/valid.c
@@ -317,7 +317,7 @@
     if (cur->c1 != NULL) xmlFreeElementContent(cur->c1);
     if (cur->c2 != NULL) xmlFreeElementContent(cur->c2);
     if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
-    memset(cur, -1, sizeof(xmlElementContent));
+    MEM_CLEANUP(cur, sizeof(xmlElementContent));
     xmlFree(cur);
 }
 
@@ -482,7 +482,7 @@
 	xmlFree((xmlChar *) elem->name);
     if (elem->prefix != NULL)
 	xmlFree((xmlChar *) elem->prefix);
-    memset(elem, -1, sizeof(xmlElement));
+    MEM_CLEANUP(elem, sizeof(xmlElement));
     xmlFree(elem);
 }
 
@@ -777,7 +777,7 @@
     if (cur->next != NULL) xmlFreeEnumeration(cur->next);
 
     if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
-    memset(cur, -1, sizeof(xmlEnumeration));
+    MEM_CLEANUP(cur, sizeof(xmlEnumeration));
     xmlFree(cur);
 }
 
@@ -937,7 +937,7 @@
 	xmlFree((xmlChar *) attr->defaultValue);
     if (attr->prefix != NULL)
 	xmlFree((xmlChar *) attr->prefix);
-    memset(attr, -1, sizeof(xmlAttribute));
+    MEM_CLEANUP(attr, sizeof(xmlAttribute));
     xmlFree(attr);
 }
 
@@ -1285,7 +1285,7 @@
 	xmlFree((xmlChar *) nota->PublicID);
     if (nota->SystemID != NULL)
 	xmlFree((xmlChar *) nota->SystemID);
-    memset(nota, -1, sizeof(xmlNotation));
+    MEM_CLEANUP(nota, sizeof(xmlNotation));
     xmlFree(nota);
 }
 
@@ -1489,7 +1489,7 @@
     if (id == NULL) return;
     if (id->value != NULL)
 	xmlFree((xmlChar *) id->value);
-    memset(id, -1, sizeof(xmlID));
+    MEM_CLEANUP(id, sizeof(xmlID));
     xmlFree(id);
 }
 
@@ -1717,7 +1717,7 @@
 	if (ref == NULL) return;
 	if (ref->value != NULL)
 		xmlFree((xmlChar *)ref->value);
-	memset(ref, -1, sizeof(xmlRef));
+	MEM_CLEANUP(ref, sizeof(xmlRef));
 	xmlFree(ref);
 }