You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@ibm.net> on 2000/02/05 04:09:17 UTC

Re: Some performance analysis

>= half of the strings passed to ap_rvputs() in the 2.0
tree are constant strings, where the len could be evaluated
at compile time.  Looking at a few sample calls in http_protocol.c,
it seems that the lens of some of the other parms are already
computed (or sometimes thrown away, like the retcode from 
ap_snprintf() for a buffer passed to ap_rvputs()).  

Perhaps a new ap_rvputsl() would be appropriate for some callers, 
where there is a series of (stringptr,stringlen) pairs followed by 
NULL passed in instead of a series of stringptr followed by NULL?  
It would be not be so concise, but needless computation is ugly in 
its own way.

(Way) Too ugly, or worth playing with, at least for important
callers in http_protocol.c?

I guess strlen() and memcpy() only show up because you compiled
for debug or profiling???  I wonder how that changes the real
performance.  Besides the cost to get to the dll, the dll code
might not be as fast; presumably the optimizer could have used the 
"right" registers for strlen/memcpy if they had been inline in the 
caller.
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...