Re: [PATCH 1/7] grep: don't redundantly compile throwaway patterns under threading
- From
- Brandon Williams <bmwill@google.com>
- Date
- May 12, 2017, 17:35 UTC
- Message-ID
- <20170512173527.GD98586@google.com>
- In-Reply-To
- <20170511170142.15934-2-avarab@gmail.com>
On 05/11, Ævar Arnfjörð Bjarmason wrote:
> Change the pattern compilation logic under threading so that grep > doesn't compile a pattern it never ends up using on the non-threaded > code path, only to compile it again N times for N threads which will > each use their own copy, ignoring the initially compiled pattern.
Is there a reason each thread needs to compile the patterns as opposed to them being compiled a single time and being copies N time for N threads?
-- Brandon Williams