httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: remaining CPU bottlenecks in 2.0
Date Thu, 06 Sep 2001 20:44:15 GMT
From: "dean gaudet" <dean@arctic.org>
Sent: Wednesday, September 05, 2001 9:17 PM


> On Tue, 4 Sep 2001, Brian Pane wrote:
> 
> > * memset() is called mostly from apr_pcalloc(), which in turn is
> >   used in too many places to yield any easy optimization opportunities.
> 
> sometimes folks are lazy and ask for zeroed memory out of habit, when they
> could easily deal with garbage at less cost.

True.  Or folks are being pedantic and summarizing a dozen NULL assignments
immediately after an alloc - I'd suggest that group takes a leap into a commented
block just for clarity, and we skip initializing long lists of NULL values.
Use pcalloc where the majority of the allocation is zeroed, and palloc everywhere
else.


Mime
View raw message