httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: Some performance analysis
Date Sat, 05 Feb 2000 03:09:17 GMT
>= 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 
Jeff Trawick | | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message