in reply to Re^3: Style question: regex versus string builtin function
in thread Style question: regex versus string builtin function

You seem to have missed the point. The problem with $`, $&, $' is not that it slows down a regex, it's that it slows down *all* regexs that have no captures, say like the one in matchcontext. Your Benchmark is useless.

Replies are listed 'Best First'.
Re^5: Style question: regex versus string builtin function
by lima1 (Curate) on Oct 03, 2007 at 09:17 UTC
    No, it is not useless. Comment out the match variables in matchvars. It is not really "considerable slower" with that small strings. I just wanted to say that match variables are not as evil as everybody says and that they CAN speed things significantly up (like 500% in the benchmark). But you must be careful.