3 ms·
Is there any Python library for profiling or optimizing regex? E.g. for a given set of fixture data, see which order things inside each group should be in to ge
by Alex3917 8y ago
Is there any Python library for profiling or optimizing regex? E.g. for a given set of fixture data, see which order things inside each group should be in to get the fastest test suite times while everything still passes.
- valarauca1 8y agoOptimal layout of a NFA-Regex is (I assume) an Hard academic Problem. Which means a library likely won't just be able to "do it for you". The CS-Fundamentals that underscore (Python, Perl, PRCE, and Java regexes) are the same. So this longer article may help: https://www.javaworld.com/article/2077757/core-java/optimizing-regular-expressions-in-java.html https://www.javaworld.com/article/2077757/core-java/optimizi... as while the syntax of the regex may change, the side effects and performance implications of the individual operators will not.