It might also be much faster to join all those regexes together to a single regex and match it once, instead of iterating over the regexes (Don't know if that works in your case).And it also may be a lot slower. Combining the patterns may cause the optimizer to give up much earlier (or not kick in at all). OTOH, the code as given would benefit from a combined pattern in the sense than no recompilation is needed at all (but there are other ways to achieve that). OP should do some benchmarking to see whether combining the patterns is an improvement or not. (If OP needs to know which "branch" of an alternation matched, the OP could make use of the (*:NAME) construct - provided the OP uses 5.10 or later).
In reply to Re^2: An efficient way to parallelize loops
by JavaFan
in thread An efficient way to parallelize loops
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |