GNU bug report logs -
#60506
feature: parallel grep --recursive
Previous Next
Full log
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
There's no need for special logic in grep to run parallel grep's.
The "parallel" command can handle that for you.
For example, on the 12 core, 24 thread Ryzen CPU that I am using:
find $HOME -xdev -type f -ctime -333 | wc -l ## counts 136126 files.
find $HOME -xdev -type f -ctime -333 |
parallel -m grep -l foobar | wc -l ## takes about 13 seconds
find $HOME -xdev -type f -ctime -333 |
xargs -d '\n' grep -l foobar | wc -l ## takes about 52 seconds
The above parallel invocation ran 24 grep commands in parallel, and took
about 1/4 the time, otherwise performing rather like xargs, which ran one grep
command at a time.
(Granted, reading either the 'parallel' or 'xargs' man pages is not easy <grin>.)
--
Paul Jackson
pj <at> usa.net
This bug report was last modified 2 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.