On Fri, Oct 14, 2016 at 8:14 AM, Aaron Zhou Qian <aaronzhouq...@ucla.edu> wrote: > Hi, > > I've multithreaded the grep at the file granularity when used with -r or -R > on directories. The four files that I changed i.e. grep.c dosbuff.c > dfasearch.c search.h under src/ is in this repository: > > https://github.com/AaronZhouQian/grep > > Please take a look at the README there. > > > The default number of threads is the number of cores online in the system. > > To specify a custom number of threads use -p or --parallel followed by the > number of threads. > > Currently multithreading does not support context i.e. -A -B -C > > > I'd like to invite everyone to test this patch.
Thank you for working on that. Before even looking at your patch, I have to ask whether you have filed copyright assignment papers with the FSF. If not, I can get you started. Secondly, did you know that Zev Weiss has submitted some patches to make grep multithreaded? He also helped to make dfa.c (now in gnulib) multithread safe recently. It's been a while, and I don't know the status of his patch set. At a minimum, please tell us how your approach compares to his. https://github.com/zevweiss/grep