by chuckcode · 11y ago · 0 comments
Thou Shalt Not: 45. Use Regular Expressions, Smart Match, q Quoting Mechanisms, Unicode/UTF-8, Or String Interpolation
And the performance of Perl's regular expressions is rarely something that slows down actual code. Using it in the first place (instead of more specific parsing) might be an item, though...
In my perl variant I'm planning to improve the inefficient and overly simple and troublesome Spencer two-pass compiler with backtracking support to use the faster Thompson NFA without backtracking (RE2), and/or switch to pcrejit when no pcre-incompatible ops are used, like unicode character classes. The first pass which calculates the space can be easily used for that.
But a better regex compiler should get away with one-pass and extend the ops dynamically.