In addition to what the other monks have already said (maintainability, etc etc)
There are many variables and results can vary if you change any one, be it hardware, perl version/config, data, regex ... and your benchmarks should reflect that, so you can figure out whether its worth doing.
See two such benchmarks Re^3: Increasing the efficiency of a viral clonal expansion model, Re^4: Hamming Distance Between 2 Strings - Fast(est) Way?
See also, on benchmarking and (micro)optimizations, regex engine changes...
if you need to use Benchmark.pm in order figure out which of two ways is faster, then it probably isn't worth your time to be worrying about that "optimization". Using Benchmark.pm is a good way to figure out how much faster something is.--tye
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."--Donald Knuth
In reply to Re: Multiple Regex evaluations or one big one?
by Anonymous Monk
in thread Multiple Regex evaluations or one big one?
by flyerhawk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |