Autor: Zoltán Herczeg Datum: To: pcre-dev@exim.org, Ralf Junker Betreff: Re: [pcre-dev] Strangely long matching times. Could anyone help to
explain?
> However, it is surprising that JIT times grow linearly with subject > length, whereas the interpreter's grow exponentially.
I posted a link which explains the reason of the difference. The /aa.*?bba/ is converted to /aa.*?(*SKIP)bba/ internally, and the latter can be executed in linear time.
Regarding perl, the 10000 case is 0.7ms with both perl and jit on my machine, while jit is faster in the 100000 case (4.6ms to 6.8 ms). It looks like perl also do the linear optimization.