bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] unistr/u8-strchr: speed up searching for ASCII characters


From: Pádraig Brady
Subject: Re: [PATCH] unistr/u8-strchr: speed up searching for ASCII characters
Date: Tue, 20 Jul 2010 10:50:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 18/07/10 16:23, Bruno Haible wrote:
> Hi Pádraig,
> 
>> However, the first byte of a multibyte
>> UTF-8 char is the same for a lot of characters
> 
> Yes. The last byte is equidistributed across the range 0x80..0xBF, whereas
> the first byte is often the same. I'm applying the commit below to exploit it
> for speed.

Nice one Bruno.
Testing the interesting 2 and 3 byte cases shows an improvement
of 10 and 15% respectively.

cheers,
Pádraig.



reply via email to

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