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

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

Re: grep is horriby slow in UTF-8 locales


From: Glenn Maynard
Subject: Re: grep is horriby slow in UTF-8 locales
Date: Fri, 7 Nov 2003 12:20:39 -0500
User-agent: Mutt/1.5.4i

On Fri, Nov 07, 2003 at 12:52:44PM +0000, Markus Kuhn wrote:
> $ grep --version
> grep (GNU grep) 2.5.1
> $ LC_ALL=en_GB.UTF-8 time grep XYZ test.txt
> Command exited with non-zero status 1
> 6.83user 0.07system 0:06.93elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (157major+34minor)pagefaults 0swaps
> $ LC_ALL=POSIX time grep XYZ test.txt
> Command exited with non-zero status 1
> 0.07user 0.09system 0:00.16elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (125major+24minor)pagefaults 0swaps

FYI:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206470
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=181378

I've noticed this, too.  I often use LANG=C for grepping due to this.

Someone mentioned --with-included-regex, but that's not good enough
(a 10% gain for me).

-- 
Glenn Maynard




reply via email to

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