in reply to Regex: is it faster to be vague?

If you want to match the date 04/30/2010 then neither \d{2}\/\d{2}\/\d{4} nor \S+ is correct. Both will match ٦٦/٦٦/٦٦٦٦, or 98/76/5432 for that matter. Neither of them is actually 04/30/2010. If you just don't care about false positives, returning 1 instead of doing a match is the fastest way.

In general, being as precise as possible is the fastest, as that allows Perl to fail early. Always remember that when benchmarking matching: benchmark failures as well. But that's the general cause. There will be endless examples and cases with additional assumptions where vagueness wins. But those will be exceptions.