Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

switch to PCRE2 with jit (evtl. Hyperscan with fallback) #266

Open
rurban opened this issue Apr 9, 2017 · 0 comments
Open

switch to PCRE2 with jit (evtl. Hyperscan with fallback) #266

rurban opened this issue Apr 9, 2017 · 0 comments
Assignees
Projects
Milestone

Comments

@rurban
Copy link
Member

rurban commented Apr 9, 2017

PCRE2 is about 40% faster,
more compatible than perl5 in most cases,
has an acceptable code quality unlike our old slow 2-pass spencer regcomp/regexec code with setjmp/longjmp logic and iteration over recursion,
has minor cornercase problems: empty \N names, \B{}, see http:https://www.pcre.org/current/doc/html/pcre2compat.html,
only one major blocking bug rurban/re-engine-PCRE2#15
and overall almost less regex bugs than older perls. Which is relevant when writing portable code.
See https://github.com/rurban/re-engine-PCRE2/#failing-tests

For the cornercases we can always fallback to the old core re engine, maybe as dynamic module.
In the current tests it's the other way round. PCRE2 as dynamic module falls back to core. Need stats (dtrace probes?)

With boolean matches only, without capture groups, backtracking, ...
and only on Intel CPUs, also try use the much faster Hyperscan engine,
if provided by the system (c++ and very new Boost).
E.g. only the latest 2 Ubuntu's, not the LTE, not on travis.
See https://github.com/rurban/re-engine-Hyperscan and https://rust-leipzig.github.io/regex/2017/03/28/comparison-of-regex-engines/ (3x faster than pcre2-jit)

@rurban rurban self-assigned this Apr 9, 2017
@rurban rurban added this to the v5.28.0c milestone Apr 9, 2017
@rurban rurban added this to In progress in cperl Dec 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
cperl
  
In progress
Development

No branches or pull requests

1 participant