This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BZ#14317: Optimze __xpg_strerror_r


On Sat, Dec 1, 2012 at 12:03 PM, Andreas Jaeger <aj@suse.com> wrote:
> Going through the waiting bugs, I noticed this small patch.
>
> Bruno comments:
>> The implementation of __xpg_strerror_r spends time doing an strlen call,
>> and then potentially returning before the value is actually used.
>>
>> This can be optimized.
>
> And Carlos answered:
>> Bruno,
>>
>> Fold the copyright years together e.g. 1991-2012.
>>
>> If you haven't posted this to libc-alpha, please do and I'll ack.
>>
>> This looks like a straight forward and useful optimization.
>
> Unfortunately, this was never send to libc-alpha.
>
> Ok to put it in now?
> Andreas
>
> 2012-12-01  Bruno Haible  <bruno@clisp.org>
>
>         [BZ #14317]
>         * string/xpg-strerror.c (__xpg_strerror_r): Optimize, call strlen
>         only if needed.

I'd like to avoid changes that aren't trivial or bug fixes.

This looks like a straight forward optimization, but removing a call
to strlen changes the behaviour of the program, and therefore doesn't
count as trivial or a bug fix.

I'd rather see it marked milestone 2.18 and priority P1, and put in
when we reopen.

Does that make sense?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]