bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] (x)memcoll: performance improvement when input is known to b


From: Chen Guo
Subject: Re: [PATCH] (x)memcoll: performance improvement when input is known to be NUL delimited.
Date: Mon, 8 Mar 2010 14:33:18 -0800 (PST)

Hi Bruno,

    I'll make all the changes you proposed, except this I have some questions
about:



> For each input line, xmemcoll is called multiple times? Then you can certainly
> gain much more speed than 1% by replacing memcoll with 2 x memxfrm and
> 1 x memcmp2. Of course, the 'sort' program will then need additional temporary
> storage for the memxfrm() results of each line.
> 
> It makes no big difference in the "C" locale, but in a "ja_JP.UTF-8" locale,
> I bet the speed difference will be much larger.

I'm actually not sure how sort handles locales that well, it seems xmemxfrm is
only called on comparing a random key, but it doesn't really make sense to me
that sort would consider non-C and non-POSIX locales as sorting with random
keys. I'm going to see Professer Eggert today, and I'll be sure to bring this 
up,
and then check with you againon what to do about this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]