Hi,
thanks for sharing these improvements!
On 20 October 2013 17:35, Zoltán Herczeg <hzmester@???> wrote:
> Hi all,
>
> Now it can even replace \s* to \s*+ in /\s*(?:left|right)?hand/.
>
That is, it can detect that anything coming after the \s* won't
include a \s, so it can possessify the quantifier?
> Back to the results, then. Once I got a pattern set used by an Intrusion Detection System, and I use it for benchmarking and also getting ideas how people use regular expressions. Sometimes I browse http://regexlib.com/ as well. I realized that most patterns are not exactly efficient, so regex compiler optimizations such as auto-possessifying seems very important. The gain provided by this particular optimization is the following (INT: interpreter, JIT: PCRE-JIT compiler, s: seconds):
>
> was: INT: 412.16 s, JIT: 86.22 s
> now: INT: 182.94 s, JIT: 45.46 s
> progress: INT: 125% JIT: 90%
>
> Of course on other pattern sets the results might be totally different, but we hope this helps to improve the overall performance of our favourite regex engine.
"Impressive, most impressive" :)
Are we going to see these optimizations as part of PCRE 9 (together
with the new API) or do you plan to roll them in the 8.xx series too?
Thanks again for your work,
--
Giuseppe D'Angelo