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:
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.