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

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

grep is horribly slow


From: Rafal Dabrowa
Subject: grep is horribly slow
Date: Thu, 04 Oct 2007 22:14:39 +0200
User-agent: Icedove 1.5.0.12 (X11/20070730)

Grep appears to be horribly slow. See:

    $ yes | head -5000 >file
    $ ls -l file
    -rw-r--r-- 1 rafal rafal 10000 2007-10-04 22:02 file
    $ time grep y file >out

    real        0m2.378s
    user        0m2.376s
    sys 0m0.004s
    $ time sed -n '/y/p' file >out

    real        0m0.008s
    user        0m0.008s
    sys 0m0.000s
    $ grep --version
    GNU grep 2.5.3

Over 2 seconds for scanning a ~10 kB file ?


--
Rafal




reply via email to

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