On Thu, Mar 28, 2013 at 1:38 PM, Stefan Fritsch <s...@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/