bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [grep] about 200 times slower than Sed or Perl


From: Eduard Bloch
Subject: Re: [grep] about 200 times slower than Sed or Perl
Date: Fri, 12 Mar 2004 17:13:53 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

#include <hallo.h>
* Jim Meyering [Fri, Mar 12 2004, 04:44:59PM]:
> "Eli Zaretskii" <address@hidden> wrote:
> >> Date: Tue, 9 Mar 2004 11:44:47 +0100
> >> From: Eduard Bloch <address@hidden>
> >>
> >> today I tried to weed out some useles lines from a large log file and
> >> was amazed to see that the current grep versions (and fgrep) are
> >> slow like hell.
> >
> > Thanks for publishing the results, but please give more information so
> > that others could look into the possible reasons of this.  Versions of
> > Grep, Perl, and Sed you used, as well as the size of the kern.log file
> > would be most useful.
> 
> Please include the output of the `locale' command, too.
> If you're not using the `C' locale, then you might want to
> try that as well.
> 
>   env LC_ALL=c grep ...

Okay, test data: http://www-user.rhrk.uni-kl.de/~blochedu/kern.log.bz2

The problem is indeed related to the locale. With non-UTF-8 locale, I
get the usual speed. With an UTF-8 locale and "-v MAC" I get the
breakdown described in the original report. But grep -v MÄC (for
example, an UTF-8 string) is fast, OTOH. Very confusing results.

MfG,
Eduard.
-- 
Der Dichter ist freier als der Philosoph.
                -- Jean Paul




reply via email to

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