Re: why a.pl is faster than b.pl
- From: bob_showalter@xxxxxxxxxxxxxxx (Bob Showalter)
- Date: Thu, 29 Dec 2005 09:23:06 -0500
Jeff Pang wrote:
Hi,bob,
You said:
3. It will probably be faster to use a single regex of the format:
/pata|patb|patc|patd/
In fact maybe you are wrong on this.
Darn. First time this year :-)
Based on my test case,the RE written as below:
/pata/ || /patb/ || /patc/ || /patd/
is much faster than yours.
OK. Perhaps its due to backtracking. Go with what works! .
- Follow-Ups:
- Re: why a.pl is faster than b.pl
- From: Chris Devers
- Re: why a.pl is faster than b.pl
- References:
- Re: why a.pl is faster than b.pl
- From: Jeff Pang
- Re: why a.pl is faster than b.pl
- Prev by Date: Installing Perl
- Next by Date: Re: why a.pl is faster than b.pl
- Previous by thread: Re: why a.pl is faster than b.pl
- Next by thread: Re: why a.pl is faster than b.pl
- Index(es):