BZ#14317: Optimze __xpg_strerror_r
Andreas Jaeger
aj@suse.com
Mon Dec 3 15:39:00 GMT 2012
On Sunday, December 02, 2012 16:23:58 Carlos O'Donell wrote:
> 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?
Sure, I'll do that now - and once 2.18 opens, will commit it,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list