bug-grep
[Top][All Lists]
Advanced

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

Re: [bug #36567] grep -i (case-insensitive) is broken with UTF8


From: Paul Eggert
Subject: Re: [bug #36567] grep -i (case-insensitive) is broken with UTF8
Date: Fri, 01 Jun 2012 14:23:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/01/2012 02:13 PM, Jim Meyering wrote:
> Odd... that seems like a transformation that gcc should be able to perform.
> If gcc someday learns to recognize and optimize this sort of code,
> is it really worth making this change?

I doubt that GCC will be able to do that optimization
any time in the forseeable future,
since the function in question is an external function.
It'd require whole-program optimization.  The problem
is that GCC can't tell whether mbtolower has squirreled
away the address of the size somewhere, and whether some
other function is therefore modifying the size, so it
constantly has to reload the size from memory.  This
adds a few hundred bytes to the code and can't be helping
performance any.



reply via email to

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