bug-grep
[Top][All Lists]
Advanced

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

Re: grep --ignore-case efficiency


From: arnold
Subject: Re: grep --ignore-case efficiency
Date: Wed, 30 Jan 2013 00:09:41 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Hello.

You do not state which version of grep you are using (grep --version will
tell you, and us).  Older versions of grep did indeed have some issues
with ignoring case in non-ASCII locales.  The simple solution was to do

        export LC_ALL=C

and then run grep, which would give you a big speedup.

More recent versions of grep have had a lot of work done in this area.
You may wish to try downloading and building the most recent release
and then see if it runs faster.

HTH,

Arnold


Paulo Nogueira <address@hidden> wrote:
>   Hello,
>
>   this is not about a bug in the usual sense, rather
>   about the poor(?) efficiency of "grep --ignore-case"
>   as compared to the default do-not-ignore-case.
>
>   Although I am completely oblivious of the inner workings
>   of grep, it seems rather strange that the ignore-case
>   could take (say) tens of times longer to execute than
>   the do-not-ignore-case -- and I am referring to normal
>   ASCII files.
>
>   Provided there is an efficient way to convert from one
>   character case to the other, as there is in ASCII (say)
>   it seems pretty obvious that one could achieve a much
>   smaller execution-time ratio. Is the need to accommodate
>   for a generic character set the problem? What is?
>
>   Best regards
>    Paulo



reply via email to

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