apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@apache.org>
Subject Re: [PATCH] performance improvement for apr_pstrcat
Date Fri, 28 Sep 2001 03:46:30 GMT
Cliff Woolley wrote:

> On Wed, 26 Sep 2001, Brian Pane wrote:
> 
> 
>>apr_pstrcat does two passes through its args: one to compute the
>>length, a second to do the copying.  This patch adds a buffer to
>>save the lengths of the first 6 args so that the second pass
>>doesn't need to another strlen on them.  (If you pass in more than
>>6 strings to concatenate, this optimization just gets applied to the
>>first 6.)
>>
> 
> Ahh, how I wish we had those nifty counted strings.  But anyway, since
> that's not gonna happen anytime soon, +1.

+1 from me as well.
(commited with a #define instead of const int, as that doesn't work on NT
and ryan's remarks)


> 
> --Cliff
> 
> --------------------------------------------------------------
>    Cliff Woolley
>    cliffwoolley@yahoo.com
>    Charlottesville, VA
> 
> 
> 



Mime
View raw message