apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [PATCH] Reduce apr_[i|l|off_t_]toa memory footprint for common cases
Date Thu, 28 Mar 2013 18:32:02 GMT
On Thu, Mar 28, 2013 at 1:38 PM, Stefan Fritsch <sf@sfritsch.de> wrote:
> On Monday 25 March 2013, Christophe JAILLET wrote:
>> As a first step, I noticed that apr_itoa, apr_ltoa, apr_off_t_toa
>> could  be tweaked to require less memory for some common cases.
>> The attached patch reduces memory use for small values, that is to
>> say  for strings that fit in 8 bytes (including NULL)
>
> Looks like a reasonable optimization to me.
>
> Cheers,
> Stefan

When shrinking it down to 8, why not avoid the apr_palloc altogether?
Also, how about lower-casing the name BUFFER_SIZE since it isn't
const?


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Mime
View raw message