[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-grep] Re: fgrep execution time
From: |
David Bailey |
Subject: |
[bug-grep] Re: fgrep execution time |
Date: |
Wed, 23 Feb 2005 09:34:03 +0900 |
Stepan,
Very impressive! Thanks for the tip.
> GNU grep 2.5.1 is awfully inefficient with non-C locales.
>
> How would the times look like if you tried the following?
>
> time yes "a very long file" | \
> head -10000 | LC_ALL=C /usr/local/bin/fgrep -f /dev/null
Looks like the locale setting caused the problem.
When we set LC_ALL=C, the run times were similar to /bin/fgrep and
/usr/xpg4/bin/grep -F.
prompt> setenv LANG ja
prompt> time yes "a very big file" | \
head -100000 | /usr/local/bin/grep -f /dev/null
0.0u 0.0s 1:15 0% 0+0k 0+0io 0pf+0w
prompt> setenv LANG C
prompt> time yes "a very big file" | \
head -100000 | /usr/local/bin/grep -f /dev/null
0.0u 0.0s 0:00 0% 0+0k 0+0io 0pf+0w
The third field in the output of the csh time command is wallclock time.
75 seconds when locale is ja (Japanese), less then 1 second when locale
is C.
BTW: We get the same results under Linux (RedHat EL 3.0 AS).
David M. Bailey
bailey-david.vcf
Description: David Bailey ĚJ[h