Beside that, I think without testing, this is faster as your re:Without testing as well, I doubt that. The Perl regexp engine has a pretty good optimizer, and it does quite well with fixed strings. But one of the easiest ways to bypass the optimizer is the use of character classes.
In reply to Re^2: perl performance vs egrep
by Anonymous Monk
in thread perl performance vs egrep
by dba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |