On Tue, 28 May 2019, I wrote: > > ./pcre2test -tm > > PCRE2 version 10.34-RC1 2019-04-22 > > re> /abcd/ > > data> \[012345678a]{2000} > > Match time 0.1659 milliseconds > > No match > > data> > > re> /abcd/jit > > data> \[012345678a]{2000} > > Match time 0.0027 milliseconds > > No match > > Thanks for posting that example. I've just noticed that an improvement > may be possible in the interpreter
Experiments show that the limit on searching for a "must have" code unit were rather low, especially for unanchored searches. I have increased the limit for unanchored matches substantially, giving a big improvement for your example: $ ./pcre2test -tm zz PCRE2 version 10.34-RC1 2019-04-22 /abcd/ \[0123456789a]{2000} Match time 0.0002 milliseconds The old value is 0.0477 on my box No match $ ./pcre2test -tm -jit zz PCRE2 version 10.34-RC1 2019-04-22 /abcd/ \[0123456789a]{2000} Match time 0.0185 milliseconds No match Even when memchr can't be used: $ ./pcre2test -16 -tm zz PCRE2 version 10.34-RC1 2019-04-22 /abcd/ \[0123456789a]{2000} Match time 0.0067 milliseconds No match $ ./pcre2test -16 -jit -tm zz PCRE2 version 10.34-RC1 2019-04-22 /abcd/ \[0123456789a]{2000} Match time 0.0185 milliseconds No match However, it is certainly the case that one can fine-tune example to make the figures better or worse. Regards, Philip -- Philip Hazel -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev