Re: git grep with leading inverted bracket expression

2018-06-07 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 07 2018, Matthew Wilcox wrote: > On Thu, Jun 07, 2018 at 09:09:25PM +0200, Ævar Arnfjörð Bjarmason wrote: >> On Thu, Jun 07 2018, Matthew Wilcox wrote: >> > If the first atom of a regex is a bracket expression with an inverted >> > range, >> > git grep is very slow. >> >> I have

Re: git grep with leading inverted bracket expression

2018-06-07 Thread Matthew Wilcox
On Thu, Jun 07, 2018 at 09:09:25PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Thu, Jun 07 2018, Matthew Wilcox wrote: > > If the first atom of a regex is a bracket expression with an inverted range, > > git grep is very slow. > > I have some WIP patches to fix all of this, which I'll hopefully

Re: git grep with leading inverted bracket expression

2018-06-07 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 07 2018, Matthew Wilcox wrote: > If the first atom of a regex is a bracket expression with an inverted range, > git grep is very slow. > > $ time git grep 'struct_size' >/dev/null > > real 0m0.368s > user 0m0.563s > sys 0m0.453s > > $ time git grep '[^t]truct_size' >/dev/null >

git grep with leading inverted bracket expression

2018-06-07 Thread Matthew Wilcox
If the first atom of a regex is a bracket expression with an inverted range, git grep is very slow. $ time git grep 'struct_size' >/dev/null real0m0.368s user0m0.563s sys 0m0.453s $ time git grep '[^t]truct_size' >/dev/null real0m31.529s user1m54.909s sys 0m0.805s If