When looking for matches with grep
, I often notice that the subsequent search takes significantly less time than the first-- e.g. 25s vs. 2s. Obviously, it's not by reusing the data structures from its last run-- those should've been deallocated. Running a time
command on grep
, I noticed an interesting phenomenon:
real 24m36.561s
user 1m20.080s
sys 0m7.230s
Where does the rest of the time go? Is there anything I can do to make it run fast every time? (e.g. having another process read the files, before grep
searches them.)