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

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

grep -i excessively slow


From: Paul Rubin
Subject: grep -i excessively slow
Date: 22 Sep 2005 22:06:17 -0000

I have a text file of about 40 megabytes.  If I grep for "hello" (file
is in ram cache) on my p3-750 it takes about 0.1 cpu seconds:

    address@hidden time grep hello myfile >/dev/null

    real    0m0.226s
    user    0m0.111s
    sys     0m0.111s

Now I do the same thing with grep -i, and it takes 200 times longer:

    address@hidden time grep -i hello myfile >/dev/null

    real    0m23.437s
    user    0m22.133s
    sys     0m0.162s

This makes me think that grep is doing something really dumb when -i
is used.




reply via email to

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