Re: speculation about remaping

2019-01-15 Thread Alan Carroll
Yes, this would depend heavily on how much optimization / transform the RE compiler does. After all, Leif's argument would seem to work against using a Trie, but that is in fact faster because of pattern matching re-organization. On Tue, Jan 15, 2019 at 11:29 AM Walt Karas wrote: > I don't know

Re: speculation about remaping

2019-01-15 Thread Walt Karas
I don't know the details of the algorithm for generating a state machine to match a PCRE. I was wondering if there is an optimization so that matching an alteration of subpatterns is faster than than matching each subpattern sequentially. On Tue, Jan 15, 2019 at 11:21 AM Leif Hedstrom wrote: > >

Re: speculation about remaping

2019-01-15 Thread Leif Hedstrom
> On Jan 15, 2019, at 10:09 AM, Walt Karas wrote: > > When we remap we go through the list of regexs looking for a match. > What if we took all the regexes, removed subpattern captures, and > created one giant pattern with alternation and capture of the regex > for each rule, like: > > (regex

speculation about remaping

2019-01-15 Thread Walt Karas
When we remap we go through the list of regexs looking for a match. What if we took all the regexes, removed subpattern captures, and created one giant pattern with alternation and capture of the regex for each rule, like: (regex1)|(regex2)|...|(regexN) We could then just step through the array o