Re: [pcre-dev] JIT is silently off

Pàgina inicial
Delete this message
Autor: ND
Data:  
A: Pcre-dev
Assumpte: Re: [pcre-dev] JIT is silently off
> I am sorry I forgot to reply. Philip guess was right, JIT can only use
> 64K machine stack, and itcannot compile the pattern if it runs out of
> it. The exact rules are not documented since they maychange any time
> when new optimizations are introduced (e.g. a capturing bracket may use
> 2 or 3machine words depending on certain conditions). Currently each a*
> uses two machine words (16 byteson 64 bit). I suggest to split your
> patterns to smaller ones, and do multiple matches. In generalJIT can
> reject any patterns (e.g. it rejects \C), and there are tests for
> rejected patterns in thetest suite.



It's very bad news for me.
Yesterday I test my patterns (each have around 1,5-2M size) and find that
JIT don't work with all of they.
Unfortunately this patterns can't be splitted due to it's automatically
construction.
Is there way to grow this 64K stack size or another way to use JIT?

PCRE is designed to work with very large patterns:
"In the 8-bit library, the default maximum compiled pattern size is around
64K. You can increase this by adding --with-link-size=3 to the
"configure"
command. PCRE2 then uses three bytes instead of two for offsets to
different
parts of the compiled pattern. In the 16-bit library, --with-link-size=3
is
the same as --with-link-size=4, which (in both libraries) uses four-byte
offsets. Increasing the internal link size reduces performance in the
8-bit
and 16-bit libraries. In the 32-bit library, the link size setting is
ignored, as 4-byte offsets are always used."

Zoltan, can it be possible to learn JIT to work with such large patterns
please?

Thanks.