Re: [xml] too many mallocs?



  is that with the CVS version ?

Sorry, no (I had problems downloading the snapshot, now it works!).

This was done with 2.4.21

BTW: Other optimizing attempts, which gave rather thin
results:

1) In xmlParseEndTag, don't call xmlParseName but a new stripped down
xmlParseNameAndCompare which can avoid NameChar checking and
one malloc.

2) Dis-Inline all but the first line of GROW and SHRINK

Gives about 5% each in best case. I will retry these against the CVS 
version and after I got hold of the bigger causes of inefficency.

BTW2: (Sorry for scholarizing [if this word exists]) I'm under the 
impression, that some coding style in libxml2, isn't a good fit for modern 
processors, if we try to save essential nanoseconds: The macros (you 
already have reverted the bigger ones to functions) enlarge the code size 
and hit the branch target buffer badly, if they contain more than one 
conditional. The multiple returns from a function will also trash the branch 
target buffer. (Not that you or anybody else should have sleepless nights 
from this).






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]