This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] Speed up strcoll by inlining
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Leonhard Holz <leonhard dot holz at web dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 16 Nov 2014 12:09:55 +0100
- Subject: Re: [Patch] Speed up strcoll by inlining
- Authentication-results: sourceware.org; auth=none
- References: <54686492 dot 4000402 at web dot de> <CA+=Sn1=k49z0Vd9B7UTbMtZ1jd6j7xXv5dsC3zmSRe3x18noeg at mail dot gmail dot com> <54686F6F dot 8070808 at web dot de>
On Sun, Nov 16, 2014 at 10:33:35AM +0100, Leonhard Holz wrote:
> My development machine is a virtual 32-bit Ubuntu 14.10 Linux:
>
> gcc --version: gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1
> uname -a: Linux leo-VirtualBox 3.16.0-24-generic #32-Ubuntu SMP Tue
> Oct 28 13:13:18 UTC 2014 i686 i686 i686 GNU/Linux
>
> Best,
> Leonhard
>
> Am 16.11.2014 09:50, schrieb Andrew Pinski:
> >On Sun, Nov 16, 2014 at 12:47 AM, Leonhard Holz <leonhard.holz@web.de> wrote:
> >>This patch improves the performance of strcoll_l by inlining the two helper
> >>functions get_next_seq and do_compare.
> >
> >
> >Can you say which version of GCC you are using? And on what target.
> >Also maybe this should be analysed by the GCC folks to figure out why
> >those two functions are not inlined.
> >
It is not surprising, get_next_seq is 120 lines long and called twice so
gcc will not inline it based on size. As do_compare is called once it
should be inlined so difference is entirely from get_next_seq.