https://bugs.exim.org/show_bug.cgi?id=1916

--- Comment #13 from Philip Hazel <p...@hermes.cam.ac.uk> ---
(In reply to Markus Elfring from comment #12)
> (In reply to Philip Hazel from comment #11)
> 
> I would appreciate a bit more background information.
> http://vcs.pcre.org/pcre2/code/trunk/HACKING?revision=606&view=markup#l618
> 
> * To which data structures are non-capturing brackets mapped after
> compilation by the current regular expression engine?


$ ./pcre2test -b
PCRE2 version 10.23-RC1 2016-08-01
  re> /(?:abc|def|ghi)/
------------------------------------------------------------------
  0  33 Bra
  3   9 Bra
  6     abc
 12   9 Alt
 15     def
 21   9 Alt
 24     ghi
 30  27 Ket
 33  33 Ket
 36     End
------------------------------------------------------------------
data> 

> * Can their evaluation be optimised any further for my use case?

I doubt it. As I said before, a generalized regex engine is a very inefficient
way of searching for lots of fixed strings. It would probably be faster just
doing something simple such as sorting your strings into alphabetical order and
then generating a 1-level or 2-level index.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to