Re: [pcre-dev] pattern info per pcretest

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Sheri
CC: pcre-dev
Subject: Re: [pcre-dev] pattern info per pcretest
On Tue, 22 Nov 2011, Sheri wrote:

> Trying various patterns via console use of pcretest, I noticed that apparently
> once /S+ has been used on an re, JIT study is either being applied to
> subsequent patterns that use /S or it is being reported despite not being
> used.


Oops. That was a trivial oversight, which I have now fixed. (I should
have see it; it showed up in test 14.)

> Also I noticed that pcretest has /M is available to give code size; is there
> any pcretest option that gives study size?


No, this information hasn't ever been made available. In fact, for
non-JIT study, the size is small and fixed (and is, if I've counted it
right, 76 bytes on a 32-bit machine - this includes the pcre_extra block).

> If JIT is successful, is the compiled pattern size reported the JIT size of
> the compiled pattern, or is that part of what would be returned from
> pcre_fullinfo for PCRE_INFO_STUDYSIZE?
>
> IOW is it odd that I see the same code size for unstudied and jit-studied
> versions of the same pattern?


No, it's not odd. The size reported by pcre_fullinfo (and therefore by
pcretest) is the size of the compiled pattern not including the results
of the JIT compilation. I guess I should (a) document this and (b) draw
it to the attention of Zoltan (though he is busy working on 16-bit
support at the moment).

Philip

--
Philip Hazel