bug-grep
[Top][All Lists]
Advanced

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

bug#22357: grep -f not only huge memory usage, but also huge time cost


From: JQK
Subject: bug#22357: grep -f not only huge memory usage, but also huge time cost
Date: Thu, 10 Mar 2016 19:00:44 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

If in the following situation,

===========
file1 has numbers from 1 to 200000, 200000 lines
file2 has several lines(about 200 ~300lines) of random numbers in the
range of 1-200000
===========

The time cost for finishing the following command could be over 15
minutes on linux -- a little huge.

$ grep -v -f file1 file2

(FYI, on AIX it could only be less than 1 second)

Maybe there is also a room for optimization not only on the memory usage
but also on the time cost.


-- 
Junkui Quan (JQK)
www.redhat.com

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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