Author: Philip Hazel Date: To: Graycode CC: pcre-dev Subject: Re: [pcre-dev] Whipping up on the NO_RECURSE option
On Fri, 10 Feb 2012, Graycode wrote:
> I'm sending a patch to Philip instead of posting it here in order to
> enable him to review and adjust whatever he wants.
... which I will do in due course (but probably not for several weeks).
The performance enhancement looks impressive.
> 1) I defined a new item in CONFIG.H to specify whether to retain the
> previous frame allocation behavior or to use this new method. Perhaps
> Philip will choose not to have an option of selecting each method.
I agree with your approach for testing, but I don't think having an
option is useful for a production version.
> 2) A way was need to communicate the frame basis between pcre_exec()
> and match() functions. While a new parameter could have been used,
> I chose instead to add a (void *) pointer to the definition of the
> "match_data" structure declared in pcre_internal.h.
Good! Adding a new parameter to match() increases the amount of stack
that is used when NO_RECURSE is *not* set (i.e. the case you are not
interested in). It is something I really, really, really do not want
ever to do. There are already some fudged cases using a similar
technique to yours.
This message was posted to the following mailing lists: