re2 vs pcre regex engine performance

Viewed 1143

I have heard that "re2" regex engine is better than "pcre" in terms of performance. The numbers prove that.

But when there is match on the input, "re2" regex engine is very expensive in terms of time consumed when compared to "pcre" regex engine.

When there is no match, "re2" is better than "pcre".

Can anyone explain me why does this happen? I know "re2" doesn't support backtracking.

0 Answers
Related