Re: [pcre-dev] option setting for JIT?

Top Page
Delete this message
Author: Nils Goroll
Date:  
To: pcre-dev
Old-Topics: Re: [pcre-dev] option setting for JIT?
Subject: Re: [pcre-dev] option setting for JIT?
Hi,

I will put this topic back onto the varnish agenda so I'd like to ask enabling
JIT per-RE would still be considered as an option?

Thank you, Nils

On 29/09/14 18:21, ph10@??? wrote:
>> https://www.varnish-cache.org/ uses pcre by compiling a domain language (VCL)
>> > into C and I wonder if we can offer varnish users a way of dynamically enabling
>> > JIT per RE.
>> >
>> > Obiously one could add some flag outside the RE, but I wonder if it would make
>> > sense to add an option setting (like "(*JIT)") the the RE itself, which would
>> > have the same effect as PCRE_STUDY_JIT_COMPILE when pcre_study() is called.
>> >
>> > There could be a PCRE_STUDY_JIT_OPTION flag to allow pcre_study to turn on JIT
>> > dynamically. Callers would have to oblige to calling pcre_free_study() when
>> > using PCRE_STUDY_JIT_OPTION.
> This is something that could be thought about in the context of the new
> API for PCRE that is being developed (known as PCRE2). Preliminary code
> is already available for brave people who like testing things at
>
> svn co svn://vcs.exim.org/pcre2/code/trunk pcre2
>
> I am currently working on the documentation. Interpretive matching is
> working, but JIT has yet to be implemented (though I have just
> documented it :-).
>
> In the new API, there is no longer an explicit "study" function - as it
> turned out to be cheap, it now always done. For JIT there will be a new
> function called pcre2_jit_compile(), to be called after pcre2_compile()
> has been successful. Freeing of the JIT memory will happen automatically
> when pcre2_code_free() is called.