On Fri, 16 Jan 2026 19:29:03 -0800
Randy Bush via Postfix-users <[email protected]> wrote:

> On Fri, 16 Jan 2026 17:17:48 -0800, Viktor Dukhovni via
> Postfix-users wrote:
> 
> >> Why pcre as opposed to regex?  i.e.  
> > Because PCRE is often more capable, and may be familiar from other
> > contexts, but also because "bad advice", parsing header addresses
> > with regular expressions is always a mistake.  
> 
> hmmmm.  my unjustified instinct is that pcre is a bit heavier than
> old fashioned regex.  but, as i said, unjustified.  and the load is
> light, < 500 msg/hr make it past dnsbls etc.
[snip]

PCRE is often faster than POSIX in practice because it can
short-circuit and use programmer-guided optimizations, but its
backtracking can result in catastrophic performance degradation on
patterns like ^(a+)+$.

FWIW: I've A/B'd POSIX and PCRE a couple times on large text sample
sizes, using REs typical of my use cases at the time, and always found
PCRE to out-perform POSIX.

Regards,
Jim
-- 
Note: My mail server employs *very* aggressive anti-spam
filtering.  If you reply to this email and your email is
rejected, please accept my apologies and let me know via my
web form at <http://jimsun.LinxNet.com/contact/scform.php>.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to