[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fgrep execution time
From: |
Stepan Kasal |
Subject: |
Re: fgrep execution time |
Date: |
Tue, 22 Feb 2005 16:26:26 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
thank you, David, for your bug report.
On Tue, Feb 22, 2005 at 03:54:32PM +0100, Andreas Schwab wrote:
> David Bailey <address@hidden> writes:
> > ==> Using GNU grep
> >
> > time yes "a very long file" | \
> > head -10000 | /usr/local/bin/fgrep -f /dev/null
> > 0.00u 0.01s 0:07.95 0.1%
> >
> > time yes "a very long file" | \
> > head -100000 | /usr/local/bin/fgrep -f /dev/null
> > 0.05u 0.03s 1:27.24 0.0%
> >
> > time yes "a very long file" | \
> > head -1000000 | /usr/local/bin/fgrep -f /dev/null
> > 0.27u 0.14s 14:35.35 0.0%
> >
> > Over 14 minutes for a 17MB file.
>
> Looks like you are timing something unrelated. Note that the CPU time is
> 0.27+0.14 seconds, ie. neglectable, thus GNU grep is unlikely to blame for
> the big real time.
I'm not sure I understand what the various numbers in the output of "time"
mean, yet I'm afraid GNU grep can be the one to blame.
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
Have a nice day,
Stepan Kasal