Stone [S], on Friday, March 11, 2005 at 01:52 (-0800) made these
points:

S> Just one.  :)
S> Your expressions all say \d instead of \d? for the second digit in
S> each set, while the simple one correctly has \d?.   So your
S> expressions had an unfair advantage and as a result finish faster.

right, forget about 1.1.1 rule :)

S> Add \d? to your expressions, and you should find that "simple",
S> besides probably being the easiest to read, is also the most efficient
S> of the expressions listed.  (Note that I removed the obviously
S> inefficient ones.)

yes, and it is logical at end. The regexp using parentheses is always
slower, than longer, which doesn't. It have to "remember" values
inside them.

thanks to you, I discover some new things too :)

-- 

 ...m8s, cu l8r, Brano.

['It takes a giant to fight a giant' - H. Prym]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to