|
|
| Welcome to the Monastery | |
| PerlMonks |
Answer: Regex anchor speed ?: Is /^.*X/ faster than /X/ ? |
| ( #40552=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > regular expressions > Regex anchor speed ?: Is /^.*X/ faster than /X/ ? contributed by Fastolfe
I benchmarked it:
The string: "now is the time for all good monks to come to the aid of their perl". The results: So yah, a standalone /match/ is going to be a bit faster.
|
|
||||||||||||||||||