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

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

grep LC bug if fixed would make grep 1000 times faster


From: Dan Jacobson
Subject: grep LC bug if fixed would make grep 1000 times faster
Date: Mon, 18 Oct 2004 01:42:38 +0800

I urge you to spend a day living in a 3rd world locale.
$ time LC_ALL=C grep -v '' /var/cache/apt/pkgcache.bin
real    0m0.035s
user    0m0.015s
sys     0m0.015s
$ time grep -v '' /var/cache/apt/pkgcache.bin
real    0m18.369s
user    0m18.333s
sys     0m0.030s
$ env |grep LC
LC_MESSAGES=C
LC_COLLATE=C
LC_CTYPE=zh_TW.Big5
$ grep -V
grep (GNU grep) 2.5.1
$ file /var/cache/apt/pkgcache.bin
/var/cache/apt/pkgcache.bin: data
$ ls -l /var/cache/apt/pkgcache.bin
-rw-r--r--  1 root root 5719769 2004-10-11 10:32 /var/cache/apt/pkgcache.bin
$ perl -wle 'print 18.333/.015'
1222.2




reply via email to

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